open-telemetry / opentelemetry-ruby

OpenTelemetry Ruby API & SDK, and related gems
https://opentelemetry.io/
Apache License 2.0
484 stars 236 forks source link

Metrics: Implement Advisory Parameters #1686

Open kaylareopelle opened 1 month ago

kaylareopelle commented 1 month ago

To help update bucket boundaries for instruments in instrumentation, implement advisory parameters (AKA advice)

API: https://opentelemetry.io/docs/specs/otel/metrics/api/#instrument-advisory-parameters SDK: https://opentelemetry.io/docs/specs/otel/metrics/sdk/#instrument-advisory-parameters JS implementation example: https://github.com/open-telemetry/opentelemetry-js/pull/3876 JS instrumentation example: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/770130a7a41125dbf8a8c18b3384e5fcc370deef/plugins/node/instrumentation-undici/src/undici.ts#L127-L141

kaylareopelle commented 3 weeks ago

Right now, just working on the explicit bucket boundaries advisory parameter. Attributes is marked as experimental. Checking in on https://github.com/open-telemetry/opentelemetry-specification/issues/3785 to see if it's stable enough to implement.