Skip to content

Runtime instrumentation supports float64 runtime/metrics #7237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
w-h-a opened this issue Apr 17, 2025 · 3 comments
Open

Runtime instrumentation supports float64 runtime/metrics #7237

w-h-a opened this issue Apr 17, 2025 · 3 comments
Labels
area: instrumentation Related to an instrumentation package enhancement New feature or request instrumentation: runtime

Comments

@w-h-a
Copy link

w-h-a commented Apr 17, 2025

Problem Statement

The current runtime instrumentation supports some int64 and float64Histogram metrics from the runtime/metrics standard lib. Some of the metrics in the standard lib such as /sync/mutex/wait/total:seconds are float64. What would be required to support such metrics in the runtime instrumentation?

Proposed Solution

I am not entirely sure of a solution yet. It seems straightforward to add to the current runtime instrumentation code, and I'd be happy to contribute. However, I want to proceed in line with OTEL and the code owners of the runtime instrumentation. I'm hoping to start a conversation on how we could move forward. Any OTEL spec docs that are blocking here would be very helpful to me.

Alternatives

If nothing else, more documentation on why specific runtime/metrics are not provided would be helpful.

Prior Art

Not sure.

Additional Context

https://pkg.go.dev/runtime/[email protected]

@w-h-a w-h-a added area: instrumentation Related to an instrumentation package enhancement New feature or request instrumentation: runtime labels Apr 17, 2025
@dmathieu
Copy link
Member

The runtime metrics we provided are documented in semantic conventions.
See https://github.com/open-telemetry/semantic-conventions/blob/main/docs/runtime/go-metrics.md

Before we can add new metrics, we'd need to update the semconvs.

@w-h-a
Copy link
Author

w-h-a commented Apr 18, 2025

Thanks for the pointer. I will read up!

@w-h-a
Copy link
Author

w-h-a commented Apr 23, 2025

Opened an issue in the semantic-conventions repo: open-telemetry/semantic-conventions#2161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: instrumentation Related to an instrumentation package enhancement New feature or request instrumentation: runtime
Projects
None yet
Development

No branches or pull requests

2 participants