-
Notifications
You must be signed in to change notification settings - Fork 247
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
feat: Explicit bucket boundary advisory parameter #1703
base: main
Are you sure you want to change the base?
feat: Explicit bucket boundary advisory parameter #1703
Conversation
The advisory parameter explicit_bucket_boundaries allows instrumentation authors to set bucket boundaries for histograms that differ from the default bucket set. Since this only applies to histograms, advice is not explicitly assigned in other instruments, however, shared methods will have an empty hash assigned as the default argument. Any key passed to advice will be accepted, but only the :explicit_bucket_boundaries symbol will have an effect.
…nto metrics-advisory-parameters
The API doesn't have the functionality tested
@@ -8,19 +8,22 @@ module OpenTelemetry | |||
module Internal | |||
# @api private | |||
class ProxyInstrument | |||
def initialize(kind, name, unit, desc, callable) | |||
def initialize(kind, name, unit, desc, callable, advice = nil) |
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.
Also, advice
is shorter than advisory_parameters
, so that's why I chose that word. However, it's not the latest terminology used in the spec. I'm happy to change to advisory_parameters
if that's preferred. Perhaps some documentation would clarify things.
must_equal(nil) will be removed in Minitest 6
…e/opentelemetry-ruby into metrics-advisory-parameters
Assign the advice instance variable in histograms only. Advice will default to nil in all cases.
This reverts commit ed4ceca.
a3467ce
to
bcb1caf
Compare
👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
The advisory parameter
:explicit_bucket_boundaries
allows instrumentation authors to set bucket boundaries for histograms that differ from the default bucket set. Since this only applies to histograms, advice is not explicitly assigned in other instruments, so shared methods have an optional argument that defaults to nil.Any key passed to advice will be accepted, but only the
:explicit_bucket_boundaries
symbol will have an effect.Advice is used by instrumentation for metrics configuration, similar to how views are used by users.
Relates to #1686