Skip to content

Commit

Permalink
Remove the use of metric/unit (#3509)
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Yahn <[email protected]>
  • Loading branch information
MadVikingGod and MrAlias authored Feb 27, 2023
1 parent e054521 commit fbcf39c
Show file tree
Hide file tree
Showing 19 changed files with 64 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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
)
16 changes: 8 additions & 8 deletions instrumentation/github.com/gocql/gocql/otelgocql/example/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/github.com/gocql/gocql/otelgocql/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
4 changes: 2 additions & 2 deletions instrumentation/github.com/gocql/gocql/otelgocql/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
Expand Down
6 changes: 3 additions & 3 deletions instrumentation/github.com/gocql/gocql/otelgocql/test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -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
)
Expand Down
12 changes: 6 additions & 6 deletions instrumentation/github.com/gocql/gocql/otelgocql/test/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
Expand Down
3 changes: 1 addition & 2 deletions instrumentation/google.golang.org/grpc/otelgrpc/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}

Expand Down
6 changes: 3 additions & 3 deletions instrumentation/host/example/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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
)
13 changes: 7 additions & 6 deletions instrumentation/host/example/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand All @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/host/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
6 changes: 3 additions & 3 deletions instrumentation/host/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand All @@ -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=
Expand Down
7 changes: 3 additions & 4 deletions instrumentation/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)",
),
Expand All @@ -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)",
),
Expand All @@ -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)",
),
Expand Down
6 changes: 3 additions & 3 deletions instrumentation/runtime/example/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Loading

0 comments on commit fbcf39c

Please sign in to comment.