opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

Update runtime instrumentation to new semantic conventions

Open MrAlias opened this issue 1 year ago • 11 comments
trafficstars

https://github.com/open-telemetry/semantic-conventions/pull/981

MrAlias avatar May 23 '24 16:05 MrAlias

Do we want a migration plan? Or do we want to just want to switch to the new conventions?

dashpole avatar May 23 '24 16:05 dashpole

+1 to just switching.

MrAlias avatar May 23 '24 16:05 MrAlias

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.

MrAlias avatar May 23 '24 17:05 MrAlias

I just need to implement the histogram metric now.

dashpole avatar Jul 15 '24 18:07 dashpole

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.

dashpole avatar Jul 17 '24 02:07 dashpole

  • 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:

MrAlias avatar Jul 17 '24 16:07 MrAlias

  • 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

MrAlias avatar Jul 17 '24 16:07 MrAlias

"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.

dashpole avatar Jul 17 '24 16:07 dashpole

I'm going to track adding the histogram metrics separately: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5974.

dashpole avatar Aug 02 '24 13:08 dashpole

Opt-in metric discussions: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/6321

MrAlias avatar Jan 30 '25 18:01 MrAlias

Specification issue tracking opt-in advice: https://github.com/open-telemetry/opentelemetry-specification/issues/4391

MrAlias avatar Feb 13 '25 18:02 MrAlias