open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.13k stars 2.39k forks source link

[connectors/servicegraph] Add native histograms support #35460

Open mar4uk opened 2 months ago

mar4uk commented 2 months ago

Component(s)

connector/servicegraph

Is your feature request related to a problem? Please describe.

Currently, the classic histogram is used for generating request duration metrics (traces_service_graph_request_server_seconds and traces_service_graph_request_client_seconds). It requires providing explicit buckets with latency_histogram_buckets configuration parameter or using default buckets [2ms, 4ms, 6ms, 8ms, 10ms, 50ms, 100ms, 200ms, 400ms, 800ms, 1s, 1400ms, 2s, 5s, 10s, 15s]

Configuration could be improved with adoption on exponential histogram

Describe the solution you'd like

Allow servicegraph connector to support exponential histograms. Configuration should allow configuring which type of histograms to use

The configuration of servicegraph connector should be changed to make it possible to configure different types of histograms. It could be similar to spanmetrics connector:

servicegraph:
   histogram:
      exponential:
          max_size: 100

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 2 months ago

Pinging code owners:

mar4uk commented 2 months ago

I'm ready to start working on this

atoulme commented 1 month ago

@mar4uk please go ahead. Codeowners, any comment on direction?