opentelemetry-go-contrib
opentelemetry-go-contrib copied to clipboard
Update runtime instrumentation to new semantic conventions
https://github.com/open-telemetry/semantic-conventions/pull/981
Do we want a migration plan? Or do we want to just want to switch to the new conventions?
+1 to just switching.
Migration plan:
- Add the new semantic conventions, these will be used by default
- Add option to turn on old metrics (in addition to the new which are default)
The old metrics will be supported for 2 releases. We do not plan to make any changes to the old metrics. If there is any CVEs they will be removed prior to the 2 release timeline.
I just need to implement the histogram metric now.
Some notes from my rough attempt to implement the histogram metric:
- It has a lot of buckets (160?). See the source: https://github.com/golang/go/blob/355711821eea51c6456a31ab61d0dc2e9db034f7/src/runtime/histogram.go#L71
- It seems like the buckets may map to our exponential histogram. We might want to consider using that instead of a fixed-bucket histogram.
- It doesn't have a Sum. I'm not sure if we can reasonably GA it without a sum. We may need to ask the Go team to add the Sum.
- It seems like the buckets may map to our exponential histogram. We might want to consider using that instead of a fixed-bucket histogram.
"buckets are power-of-2 sized" seems to motivate this :+1:
- It doesn't have a Sum. I'm not sure if we can reasonably GA it without a sum. We may need to ask the Go team to add the Sum.
Sounds like a good ask for the Go team
"buckets are power-of-2 sized" seems to motivate this 👍
It is powers-of-2 sized, but with linear "sub-buckets" between the power-of-two buckets. I asked, and the buckets are also subject to change over time, so using an exponential histogram seems like not the best idea. Slightly disappointing, but maybe an opportunity to improve in the future.
I'm going to track adding the histogram metrics separately: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5974.
Opt-in metric discussions: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/6321
Specification issue tracking opt-in advice: https://github.com/open-telemetry/opentelemetry-specification/issues/4391