opentelemetry-python icon indicating copy to clipboard operation
opentelemetry-python copied to clipboard

Setting boundaries when creating an Histogram

Open kafkaphoenix opened this issue 1 year ago • 2 comments

Is your feature request related to a problem?

  • We are offering in our library a meter previously configured so the users can create the metrics they wish, but we face the problem that the user is not going to be able to set boundaries for their histogram metrics as the only way to define boundaries is in the moment of the meter provider creation as we can see in this example

Describe the solution you'd like

  • An option to set boundaries when creating an histogram metrics as it is supported in the go sdk

Describe alternatives you've considered

  • The only workaround we see right now is pre defining a bunch of views

kafkaphoenix avatar Dec 11 '23 12:12 kafkaphoenix

Thanks for opening this. This has recently been added to the spec as the "Advisory API": https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#instrument-advisory-parameter-explicitbucketboundaries

So we just need someone to implement this :)

aabmass avatar Dec 14 '23 17:12 aabmass

@aabmass I've opened a feature request about this topic here as well, if there's consensus around it I can try proposing an implementation :grin:

lsfischer avatar Aug 21 '24 15:08 lsfischer

https://github.com/open-telemetry/opentelemetry-python-contrib/issues/3011 will benefit from this

emdneto avatar Dec 02 '24 15:12 emdneto

Closing by #4361

emdneto avatar Jan 29 '25 23:01 emdneto