From fbcf39c8fa85d7b2f907cc71e4b39518dd83e38d Mon Sep 17 00:00:00 2001 From: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com> Date: Mon, 27 Feb 2023 13:52:37 -0600 Subject: [PATCH] Remove the use of metric/unit (#3509) Co-authored-by: Tyler Yahn --- .../gocql/gocql/otelgocql/example/go.mod | 8 ++++---- .../gocql/gocql/otelgocql/example/go.sum | 16 ++++++++-------- .../github.com/gocql/gocql/otelgocql/go.mod | 2 +- .../github.com/gocql/gocql/otelgocql/go.sum | 4 ++-- .../gocql/gocql/otelgocql/instrument.go | 3 +-- .../github.com/gocql/gocql/otelgocql/test/go.mod | 6 +++--- .../github.com/gocql/gocql/otelgocql/test/go.sum | 12 ++++++------ .../gocql/gocql/otelgocql/test/gocql_test.go | 3 +-- .../google.golang.org/grpc/otelgrpc/config.go | 3 +-- instrumentation/host/example/go.mod | 6 +++--- instrumentation/host/example/go.sum | 13 +++++++------ instrumentation/host/go.mod | 2 +- instrumentation/host/go.sum | 6 +++--- instrumentation/host/host.go | 7 +++---- instrumentation/runtime/example/go.mod | 6 +++--- instrumentation/runtime/example/go.sum | 14 +++++++------- instrumentation/runtime/go.mod | 2 +- instrumentation/runtime/go.sum | 6 +++--- instrumentation/runtime/runtime.go | 13 ++++++------- 19 files changed, 64 insertions(+), 68 deletions(-) diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/example/go.mod b/instrumentation/github.com/gocql/gocql/otelgocql/example/go.mod index 09a75be7bb1..563695440d5 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/example/go.mod +++ b/instrumentation/github.com/gocql/gocql/otelgocql/example/go.mod @@ -9,11 +9,11 @@ require ( github.com/prometheus/client_golang v1.14.0 go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql v0.39.0 go.opentelemetry.io/otel v1.13.0 - go.opentelemetry.io/otel/exporters/prometheus v0.36.0 + go.opentelemetry.io/otel/exporters/prometheus v0.36.1-0.20230227180222-b177f58e09ca go.opentelemetry.io/otel/exporters/zipkin v1.13.0 - go.opentelemetry.io/otel/metric v0.36.1-0.20230221193137-99ec432679fb + go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca go.opentelemetry.io/otel/sdk v1.13.0 - go.opentelemetry.io/otel/sdk/metric v0.36.0 + go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca ) require ( @@ -30,7 +30,7 @@ require ( github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect go.opentelemetry.io/otel/trace v1.13.0 // indirect - golang.org/x/sys v0.0.0-20221010170243-090e33056c14 // indirect + golang.org/x/sys v0.5.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect ) diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/example/go.sum b/instrumentation/github.com/gocql/gocql/otelgocql/example/go.sum index b09346e2faa..7434df976ff 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/example/go.sum +++ b/instrumentation/github.com/gocql/gocql/otelgocql/example/go.sum @@ -223,16 +223,16 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= -go.opentelemetry.io/otel/exporters/prometheus v0.36.0 h1:EbfJRxojnpb+ux8IO79oKHXu9jsbWjd00cT0XmbP5gU= -go.opentelemetry.io/otel/exporters/prometheus v0.36.0/go.mod h1:gYHAjuEuMrtPXccEHyvYcQVC//c4QwgQcUq1/3mx7Ys= +go.opentelemetry.io/otel/exporters/prometheus v0.36.1-0.20230227180222-b177f58e09ca h1:RSy1dz+HxjEi3tbcjfnFp2iGWP1rSK9SJL20sVcUkug= +go.opentelemetry.io/otel/exporters/prometheus v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:iapmW6bs/5a5D9i84HxN9WzQQJyKYAZQh1MfU7vYyPA= go.opentelemetry.io/otel/exporters/zipkin v1.13.0 h1:RqPV1VhJjrx28qOKYFPj3Mso56uaBovur3GZehF9y9s= go.opentelemetry.io/otel/exporters/zipkin v1.13.0/go.mod h1:x6S2VkXmdpoYUqQx9FKiMEsndal6xkcwDdV0Oi1RlLM= -go.opentelemetry.io/otel/metric v0.36.1-0.20230221193137-99ec432679fb h1:ERlouo+/B1ERdSHUNYj1s4zT+zp2gg2J4/f69tbdio0= -go.opentelemetry.io/otel/metric v0.36.1-0.20230221193137-99ec432679fb/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca h1:CwcAEsg8nESCD37XUTfM5rP2VajHicRWnA64cJF/vd0= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:oCFgCINZEkradqd2yXqAXgYHRcPnxLoUfE7EENEZc4Y= go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM= go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I= -go.opentelemetry.io/otel/sdk/metric v0.36.0 h1:dEXpkkOAEcHiRiaZdvd63MouV+3bCtAB/bF3jlNKnr8= -go.opentelemetry.io/otel/sdk/metric v0.36.0/go.mod h1:Lv4HQQPSCSkhyBKzLNtE8YhTSdK4HCwNh3lh7CiR20s= +go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca h1:wCsK585aj6svi4TQwcK/nct1Pb+7ZDeMx8kPA3B5FEQ= +go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:bQYuEFv5Uvodr03JQeHjaIGDyFlFJvJnReJc04M5cpw= go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -356,8 +356,8 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20221010170243-090e33056c14 h1:k5II8e6QD8mITdi+okbbmR/cIyEbeXLBhy5Ha4nevyc= -golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/go.mod b/instrumentation/github.com/gocql/gocql/otelgocql/go.mod index 57664d005c2..d8a92cdb783 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/go.mod +++ b/instrumentation/github.com/gocql/gocql/otelgocql/go.mod @@ -6,7 +6,7 @@ require ( github.com/gocql/gocql v1.3.1 github.com/stretchr/testify v1.8.2 go.opentelemetry.io/otel v1.13.0 - go.opentelemetry.io/otel/metric v0.36.0 + go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca go.opentelemetry.io/otel/trace v1.13.0 ) diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/go.sum b/instrumentation/github.com/gocql/gocql/otelgocql/go.sum index 2e93a88edbe..1b6ccb21ff8 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/go.sum +++ b/instrumentation/github.com/gocql/gocql/otelgocql/go.sum @@ -34,8 +34,8 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= -go.opentelemetry.io/otel/metric v0.36.0 h1:t0lgGI+L68QWt3QtOIlqM9gXoxqxWLhZ3R/e5oOAY0Q= -go.opentelemetry.io/otel/metric v0.36.0/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca h1:CwcAEsg8nESCD37XUTfM5rP2VajHicRWnA64cJF/vd0= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:oCFgCINZEkradqd2yXqAXgYHRcPnxLoUfE7EENEZc4Y= go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/instrument.go b/instrumentation/github.com/gocql/gocql/otelgocql/instrument.go index cae09066bf1..ba88644fa26 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/instrument.go +++ b/instrumentation/github.com/gocql/gocql/otelgocql/instrument.go @@ -20,7 +20,6 @@ import ( "go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql/internal" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/metric/unit" ) type instruments struct { @@ -82,7 +81,7 @@ func newInstruments(p metric.MeterProvider) *instruments { if instruments.latency, err = meter.Int64Histogram( "db.cassandra.latency", instrument.WithDescription("Sum of latency to host in milliseconds"), - instrument.WithUnit(unit.Milliseconds), + instrument.WithUnit("ms"), ); err != nil { log.Printf("failed to create iLatency instrument, %v", err) } diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/test/go.mod b/instrumentation/github.com/gocql/gocql/otelgocql/test/go.mod index f5f159a9fea..d7490c49500 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/test/go.mod +++ b/instrumentation/github.com/gocql/gocql/otelgocql/test/go.mod @@ -8,9 +8,8 @@ require ( go.opentelemetry.io/contrib v1.14.0 go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql v0.39.0 go.opentelemetry.io/otel v1.13.0 - go.opentelemetry.io/otel/metric v0.36.1-0.20230221193137-99ec432679fb go.opentelemetry.io/otel/sdk v1.13.0 - go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230221193137-99ec432679fb + go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca go.opentelemetry.io/otel/trace v1.13.0 ) @@ -21,7 +20,8 @@ require ( github.com/golang/snappy v0.0.3 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect + go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca // indirect + golang.org/x/sys v0.5.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/test/go.sum b/instrumentation/github.com/gocql/gocql/otelgocql/test/go.sum index a01c1ba1add..c0926dfc038 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/test/go.sum +++ b/instrumentation/github.com/gocql/gocql/otelgocql/test/go.sum @@ -34,16 +34,16 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= -go.opentelemetry.io/otel/metric v0.36.1-0.20230221193137-99ec432679fb h1:ERlouo+/B1ERdSHUNYj1s4zT+zp2gg2J4/f69tbdio0= -go.opentelemetry.io/otel/metric v0.36.1-0.20230221193137-99ec432679fb/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca h1:CwcAEsg8nESCD37XUTfM5rP2VajHicRWnA64cJF/vd0= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:oCFgCINZEkradqd2yXqAXgYHRcPnxLoUfE7EENEZc4Y= go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM= go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I= -go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230221193137-99ec432679fb h1:/BUwS+4dNdmMI/ucDWKfR8GYnv+Wfh7po5v0kNI+jdI= -go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230221193137-99ec432679fb/go.mod h1:Lv4HQQPSCSkhyBKzLNtE8YhTSdK4HCwNh3lh7CiR20s= +go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca h1:wCsK585aj6svi4TQwcK/nct1Pb+7ZDeMx8kPA3B5FEQ= +go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:bQYuEFv5Uvodr03JQeHjaIGDyFlFJvJnReJc04M5cpw= go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/test/gocql_test.go b/instrumentation/github.com/gocql/gocql/otelgocql/test/gocql_test.go index dfbfb935309..79d6da227de 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/test/gocql_test.go +++ b/instrumentation/github.com/gocql/gocql/otelgocql/test/gocql_test.go @@ -30,7 +30,6 @@ import ( "go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql/internal" "go.opentelemetry.io/contrib/internal/util" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric/unit" "go.opentelemetry.io/otel/sdk/instrumentation" "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/metric/metricdata" @@ -360,7 +359,7 @@ func assertRowsMetric(t *testing.T, count uint64, m metricdata.Metrics) { func assertLatencyMetric(t *testing.T, count uint64, m metricdata.Metrics) { assert.Equal(t, "db.cassandra.latency", m.Name) assert.Equal(t, "Sum of latency to host in milliseconds", m.Description) - assert.Equal(t, unit.Milliseconds, m.Unit) + assert.Equal(t, "ms", m.Unit) require.IsType(t, m.Data, metricdata.Histogram{}) data := m.Data.(metricdata.Histogram) assert.Equal(t, metricdata.CumulativeTemporality, data.Temporality, "Temporality") diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/instrumentation/google.golang.org/grpc/otelgrpc/config.go index f491fe56462..2ae8620fb6b 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/config.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/config.go @@ -20,7 +20,6 @@ import ( "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/global" "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/metric/unit" "go.opentelemetry.io/otel/propagation" semconv "go.opentelemetry.io/otel/semconv/v1.17.0" "go.opentelemetry.io/otel/trace" @@ -71,7 +70,7 @@ func newConfig(opts []Option) *config { metric.WithSchemaURL(semconv.SchemaURL), ) var err error - if c.rpcServerDuration, err = c.meter.Int64Histogram("rpc.server.duration", instrument.WithUnit(unit.Milliseconds)); err != nil { + if c.rpcServerDuration, err = c.meter.Int64Histogram("rpc.server.duration", instrument.WithUnit("ms")); err != nil { otel.Handle(err) } diff --git a/instrumentation/host/example/go.mod b/instrumentation/host/example/go.mod index d7163c17c2b..868bd476a83 100644 --- a/instrumentation/host/example/go.mod +++ b/instrumentation/host/example/go.mod @@ -9,7 +9,7 @@ require ( go.opentelemetry.io/otel v1.13.0 go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.36.0 go.opentelemetry.io/otel/sdk v1.13.0 - go.opentelemetry.io/otel/sdk/metric v0.36.0 + go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca ) require ( @@ -22,7 +22,7 @@ require ( github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/otel/metric v0.36.0 // indirect + go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca // indirect go.opentelemetry.io/otel/trace v1.13.0 // indirect - golang.org/x/sys v0.4.0 // indirect + golang.org/x/sys v0.5.0 // indirect ) diff --git a/instrumentation/host/example/go.sum b/instrumentation/host/example/go.sum index 8c70e5bf7ae..a73648fdeea 100644 --- a/instrumentation/host/example/go.sum +++ b/instrumentation/host/example/go.sum @@ -24,8 +24,8 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= @@ -36,19 +36,20 @@ go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.36.0 h1:QTyeaWQWnyj4sAf5gEjQ3ppd06d/5T71ITTXw784uZ0= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.36.0/go.mod h1:DdhcaoDkSIxsZyWDPPfl+P+0JaDqnUCKGkDodh/74mY= -go.opentelemetry.io/otel/metric v0.36.0 h1:t0lgGI+L68QWt3QtOIlqM9gXoxqxWLhZ3R/e5oOAY0Q= -go.opentelemetry.io/otel/metric v0.36.0/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca h1:CwcAEsg8nESCD37XUTfM5rP2VajHicRWnA64cJF/vd0= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:oCFgCINZEkradqd2yXqAXgYHRcPnxLoUfE7EENEZc4Y= go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM= go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I= -go.opentelemetry.io/otel/sdk/metric v0.36.0 h1:dEXpkkOAEcHiRiaZdvd63MouV+3bCtAB/bF3jlNKnr8= -go.opentelemetry.io/otel/sdk/metric v0.36.0/go.mod h1:Lv4HQQPSCSkhyBKzLNtE8YhTSdK4HCwNh3lh7CiR20s= +go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca h1:wCsK585aj6svi4TQwcK/nct1Pb+7ZDeMx8kPA3B5FEQ= +go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:bQYuEFv5Uvodr03JQeHjaIGDyFlFJvJnReJc04M5cpw= go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/instrumentation/host/go.mod b/instrumentation/host/go.mod index 2732d86affc..bdf9d63e705 100644 --- a/instrumentation/host/go.mod +++ b/instrumentation/host/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/shirou/gopsutil/v3 v3.23.1 go.opentelemetry.io/otel v1.13.0 - go.opentelemetry.io/otel/metric v0.36.0 + go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca ) require ( diff --git a/instrumentation/host/go.sum b/instrumentation/host/go.sum index 168cb3cab23..28cf1a28946 100644 --- a/instrumentation/host/go.sum +++ b/instrumentation/host/go.sum @@ -24,8 +24,8 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= @@ -34,8 +34,8 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= -go.opentelemetry.io/otel/metric v0.36.0 h1:t0lgGI+L68QWt3QtOIlqM9gXoxqxWLhZ3R/e5oOAY0Q= -go.opentelemetry.io/otel/metric v0.36.0/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca h1:CwcAEsg8nESCD37XUTfM5rP2VajHicRWnA64cJF/vd0= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:oCFgCINZEkradqd2yXqAXgYHRcPnxLoUfE7EENEZc4Y= go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/instrumentation/host/host.go b/instrumentation/host/host.go index 73fedf5fff2..d555fdff81f 100644 --- a/instrumentation/host/host.go +++ b/instrumentation/host/host.go @@ -29,7 +29,6 @@ import ( "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/global" "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/metric/unit" ) // Host reports the work-in-progress conventional host metrics specified by OpenTelemetry. @@ -161,7 +160,7 @@ func (h *host) register() error { if hostMemoryUsage, err = h.meter.Int64ObservableGauge( "system.memory.usage", - instrument.WithUnit(unit.Bytes), + instrument.WithUnit("By"), instrument.WithDescription( "Memory usage of this process attributed by memory state (Used, Available)", ), @@ -171,7 +170,7 @@ func (h *host) register() error { if hostMemoryUtilization, err = h.meter.Float64ObservableGauge( "system.memory.utilization", - instrument.WithUnit(unit.Dimensionless), + instrument.WithUnit("1"), instrument.WithDescription( "Memory utilization of this process attributeed by memory state (Used, Available)", ), @@ -181,7 +180,7 @@ func (h *host) register() error { if networkIOUsage, err = h.meter.Int64ObservableCounter( "system.network.io", - instrument.WithUnit(unit.Bytes), + instrument.WithUnit("By"), instrument.WithDescription( "Bytes transferred attributeed by direction (Transmit, Receive)", ), diff --git a/instrumentation/runtime/example/go.mod b/instrumentation/runtime/example/go.mod index 74d12dce3fb..b9eb405d7d9 100644 --- a/instrumentation/runtime/example/go.mod +++ b/instrumentation/runtime/example/go.mod @@ -8,14 +8,14 @@ require ( go.opentelemetry.io/contrib/instrumentation/runtime v0.39.0 go.opentelemetry.io/otel v1.13.0 go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.36.0 - go.opentelemetry.io/otel/metric v0.36.0 + go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca go.opentelemetry.io/otel/sdk v1.13.0 - go.opentelemetry.io/otel/sdk/metric v0.36.0 + go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca ) require ( github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect go.opentelemetry.io/otel/trace v1.13.0 // indirect - golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect + golang.org/x/sys v0.5.0 // indirect ) diff --git a/instrumentation/runtime/example/go.sum b/instrumentation/runtime/example/go.sum index d7ac70f8f01..894bc4ff2de 100644 --- a/instrumentation/runtime/example/go.sum +++ b/instrumentation/runtime/example/go.sum @@ -6,19 +6,19 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.36.0 h1:QTyeaWQWnyj4sAf5gEjQ3ppd06d/5T71ITTXw784uZ0= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.36.0/go.mod h1:DdhcaoDkSIxsZyWDPPfl+P+0JaDqnUCKGkDodh/74mY= -go.opentelemetry.io/otel/metric v0.36.0 h1:t0lgGI+L68QWt3QtOIlqM9gXoxqxWLhZ3R/e5oOAY0Q= -go.opentelemetry.io/otel/metric v0.36.0/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca h1:CwcAEsg8nESCD37XUTfM5rP2VajHicRWnA64cJF/vd0= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:oCFgCINZEkradqd2yXqAXgYHRcPnxLoUfE7EENEZc4Y= go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM= go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I= -go.opentelemetry.io/otel/sdk/metric v0.36.0 h1:dEXpkkOAEcHiRiaZdvd63MouV+3bCtAB/bF3jlNKnr8= -go.opentelemetry.io/otel/sdk/metric v0.36.0/go.mod h1:Lv4HQQPSCSkhyBKzLNtE8YhTSdK4HCwNh3lh7CiR20s= +go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca h1:wCsK585aj6svi4TQwcK/nct1Pb+7ZDeMx8kPA3B5FEQ= +go.opentelemetry.io/otel/sdk/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:bQYuEFv5Uvodr03JQeHjaIGDyFlFJvJnReJc04M5cpw= go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/instrumentation/runtime/go.mod b/instrumentation/runtime/go.mod index 253e557212a..087b416de2c 100644 --- a/instrumentation/runtime/go.mod +++ b/instrumentation/runtime/go.mod @@ -2,7 +2,7 @@ module go.opentelemetry.io/contrib/instrumentation/runtime go 1.18 -require go.opentelemetry.io/otel/metric v0.36.0 +require go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca require ( github.com/go-logr/logr v1.2.3 // indirect diff --git a/instrumentation/runtime/go.sum b/instrumentation/runtime/go.sum index cf606b76cdc..64abf4946db 100644 --- a/instrumentation/runtime/go.sum +++ b/instrumentation/runtime/go.sum @@ -6,11 +6,11 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= -go.opentelemetry.io/otel/metric v0.36.0 h1:t0lgGI+L68QWt3QtOIlqM9gXoxqxWLhZ3R/e5oOAY0Q= -go.opentelemetry.io/otel/metric v0.36.0/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca h1:CwcAEsg8nESCD37XUTfM5rP2VajHicRWnA64cJF/vd0= +go.opentelemetry.io/otel/metric v0.36.1-0.20230227180222-b177f58e09ca/go.mod h1:oCFgCINZEkradqd2yXqAXgYHRcPnxLoUfE7EENEZc4Y= go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/instrumentation/runtime/runtime.go b/instrumentation/runtime/runtime.go index 218672e24d5..99b4673a851 100644 --- a/instrumentation/runtime/runtime.go +++ b/instrumentation/runtime/runtime.go @@ -23,7 +23,6 @@ import ( "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/global" "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/metric/unit" ) // Runtime reports the work-in-progress conventional runtime metrics specified by OpenTelemetry. @@ -120,7 +119,7 @@ func (r *runtime) register() error { startTime := time.Now() uptime, err := r.meter.Int64ObservableCounter( "runtime.uptime", - instrument.WithUnit(unit.Milliseconds), + instrument.WithUnit("ms"), instrument.WithDescription("Milliseconds since application was initialized"), ) if err != nil { @@ -194,7 +193,7 @@ func (r *runtime) registerMemStats() error { if heapAlloc, err = r.meter.Int64ObservableUpDownCounter( "process.runtime.go.mem.heap_alloc", - instrument.WithUnit(unit.Bytes), + instrument.WithUnit("By"), instrument.WithDescription("Bytes of allocated heap objects"), ); err != nil { return err @@ -202,7 +201,7 @@ func (r *runtime) registerMemStats() error { if heapIdle, err = r.meter.Int64ObservableUpDownCounter( "process.runtime.go.mem.heap_idle", - instrument.WithUnit(unit.Bytes), + instrument.WithUnit("By"), instrument.WithDescription("Bytes in idle (unused) spans"), ); err != nil { return err @@ -210,7 +209,7 @@ func (r *runtime) registerMemStats() error { if heapInuse, err = r.meter.Int64ObservableUpDownCounter( "process.runtime.go.mem.heap_inuse", - instrument.WithUnit(unit.Bytes), + instrument.WithUnit("By"), instrument.WithDescription("Bytes in in-use spans"), ); err != nil { return err @@ -227,7 +226,7 @@ func (r *runtime) registerMemStats() error { // understand the meaning of this value. if heapReleased, err = r.meter.Int64ObservableUpDownCounter( "process.runtime.go.mem.heap_released", - instrument.WithUnit(unit.Bytes), + instrument.WithUnit("By"), instrument.WithDescription("Bytes of idle spans whose physical memory has been returned to the OS"), ); err != nil { return err @@ -235,7 +234,7 @@ func (r *runtime) registerMemStats() error { if heapSys, err = r.meter.Int64ObservableUpDownCounter( "process.runtime.go.mem.heap_sys", - instrument.WithUnit(unit.Bytes), + instrument.WithUnit("By"), instrument.WithDescription("Bytes of heap memory obtained from the OS"), ); err != nil { return err