-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the internal experimental metric feature package #4715
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4715 +/- ##
=====================================
Coverage 81.9% 82.0%
=====================================
Files 224 225 +1
Lines 18208 18239 +31
=====================================
+ Hits 14930 14961 +31
Misses 2989 2989
Partials 289 289
|
Did you consider modeling this after feature-gates in the collector? https://github.com/open-telemetry/opentelemetry-collector/tree/main/featuregate. If we used it directly, it would mean collector users could configure OTel Go's feature gates using the collector's feature-gates flag, which would be neat. We would have to wait for the v1 release to avoid a circular unstable dependency. Assuming we don't want to depend on it directly, could we follow the same pattern, and use a OTEL_GO_FEATURE_GATES env var with k0=v0,k1=v1 format, and defined stages? Or is that overkill? |
I haven't looked at this yet. I'll be sure to take a look. One question I have though, is how will uses distinguish between their SDK features and collector features? For example, given we will support different features than the collector but a user may define them in the same environment variable does that mean we need to drop unknown? Do we log this error? |
We would have to decide how to handle errors from parsing the flags, including when users set feature gates that don't exist. Writing to the global error handler seems reasonable. |
@dashpole I don't see in that linked package where the environment variable |
It does not support configuration. We would need additional env vars or something else. |
We would have to add that. It only supports flags today. Or, we could require users to register flags to use it, which has the advantage of making users decide how to handle parsing failures (so they don't need to use the global error handler) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add tests?
Used to enable specification defined features. Such as:
This is the first step in adding these features.