From fd2a170973eafad3a3e5fe2a9227723371fdd208 Mon Sep 17 00:00:00 2001 From: Matej Gera Date: Tue, 31 Jan 2023 12:12:20 +0100 Subject: [PATCH 1/2] Change runtime.uptime instrument from up down counter to counter Signed-off-by: Matej Gera --- instrumentation/runtime/runtime.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/runtime/runtime.go b/instrumentation/runtime/runtime.go index 35fc16484a1..218672e24d5 100644 --- a/instrumentation/runtime/runtime.go +++ b/instrumentation/runtime/runtime.go @@ -118,7 +118,7 @@ func Start(opts ...Option) error { func (r *runtime) register() error { startTime := time.Now() - uptime, err := r.meter.Int64ObservableUpDownCounter( + uptime, err := r.meter.Int64ObservableCounter( "runtime.uptime", instrument.WithUnit(unit.Milliseconds), instrument.WithDescription("Milliseconds since application was initialized"), From 74b9ca43942cfcd14d241300f1b6ef96194f6478 Mon Sep 17 00:00:00 2001 From: Matej Gera Date: Tue, 31 Jan 2023 12:25:11 +0100 Subject: [PATCH 2/2] Update CHANGELOG Signed-off-by: Matej Gera --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f62f6c94ae..e234c15a9ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Add the new `go.opentelemetry.io/contrib/instrgen` package to provide auto-generated source code instrumentation. (#3068) +### Changed +- Change `runtime.uptime` instrument in `go.opentelemetry.io/contrib/instrumentation/runtime` from `Int64ObservableUpDownCounter` to `Int64ObservableCounter`, + since the value is monotonic. (#3347) + ## [1.13.0/0.37.0/0.7.0] - 2023-01-30 ### Added