diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c913f5758..0aa2aad6743 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Added + +- Add the unit `ns` to deprecated runtime metrics `process.runtime.go.gc.pause_total_ns` and `process.runtime.go.gc.pause_ns` in `go.opentelemetry.io/contrib/instrumentation/runtime`. (#7490) + diff --git a/instrumentation/runtime/internal/deprecatedruntime/runtime.go b/instrumentation/runtime/internal/deprecatedruntime/runtime.go index 86c7c9e34a7..5d416b66307 100644 --- a/instrumentation/runtime/internal/deprecatedruntime/runtime.go +++ b/instrumentation/runtime/internal/deprecatedruntime/runtime.go @@ -179,7 +179,7 @@ func (r *runtime) registerMemStats() error { // observation interval is too slow. if pauseTotalNs, err = r.meter.Int64ObservableCounter( "process.runtime.go.gc.pause_total_ns", - // TODO: nanoseconds units + metric.WithUnit("ns"), metric.WithDescription("Cumulative nanoseconds in GC stop-the-world pauses since the program started"), ); err != nil { return err @@ -187,7 +187,7 @@ func (r *runtime) registerMemStats() error { if gcPauseNs, err = r.meter.Int64Histogram( "process.runtime.go.gc.pause_ns", - // TODO: nanoseconds units + metric.WithUnit("ns"), metric.WithDescription("Amount of nanoseconds in GC stop-the-world pauses"), ); err != nil { return err