-
Notifications
You must be signed in to change notification settings - Fork 566
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
Update Instrumentation to metrics v0.28.0 #1977
Update Instrumentation to metrics v0.28.0 #1977
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1977 +/- ##
=======================================
+ Coverage 72.1% 72.3% +0.1%
=======================================
Files 124 126 +2
Lines 5330 5412 +82
=======================================
+ Hits 3848 3916 +68
- Misses 1370 1379 +9
- Partials 112 117 +5
|
return err | ||
} | ||
|
||
err = r.meter.RegisterCallback( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be three separate callbacks as it was before? I'm not sure what impact combining them has.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe that any of the callbacks are run in separate routines. So this would just dispense with the overhead of tracking 3 different closures and calling each one serially.
instrumentation/github.com/astaxie/beego/otelbeego/test/beego_test.go
Outdated
Show resolved
Hide resolved
instrumentation/github.com/astaxie/beego/otelbeego/test/beego_test.go
Outdated
Show resolved
Hide resolved
instrumentation/github.com/astaxie/beego/otelbeego/test/beego_test.go
Outdated
Show resolved
Hide resolved
return err | ||
} | ||
|
||
err = r.meter.RegisterCallback( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe that any of the callbacks are run in separate routines. So this would just dispense with the overhead of tracking 3 different closures and calling each one serially.
Co-authored-by: Tyler Yahn <[email protected]> Co-authored-by: David Ashpole <[email protected]>
In an effort to enable users to test the new release I will merge this sooner than the 24h window. This already has approvals from the maintainers and 1+ approver. |
…x` is "unstable", and as it specifieds a minimum version, that will include "any breaking change after". try to fix go.opentelemetry.io dependency hell docker ("indirect") and buildkit ("direct") specify `v0.29.0`; ```bash go mod graph --modfile=vendor.mod | grep ' go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp' github.com/docker/docker go.opentelemetry.io/contrib/instrumentation/net/http/[email protected] github.com/moby/[email protected] go.opentelemetry.io/contrib/instrumentation/net/http/[email protected] ``` containerd specified v0.34.0 for `go.opentelemetry.io/otel/metric`; ```bash go mod graph --modfile=vendor.mod | grep ' go.opentelemetry.io/otel/metric@' github.com/docker/docker go.opentelemetry.io/otel/[email protected] github.com/containerd/[email protected] go.opentelemetry.io/otel/[email protected] github.com/moby/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/contrib/instrumentation/net/http/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/otel/internal/[email protected] go.opentelemetry.io/otel/[email protected] ``` But BuildKit uses; ```bash git checkout v0.11.4 go mod graph | grep ' go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp' github.com/moby/buildkit go.opentelemetry.io/contrib/instrumentation/net/http/[email protected] k8s.io/[email protected] go.opentelemetry.io/contrib/instrumentation/net/http/[email protected] k8s.io/[email protected] go.opentelemetry.io/contrib/instrumentation/net/http/[email protected] ``` But looks like BuildKit has older versions of the other packages installed; ```bash go mod graph | grep ' go.opentelemetry.io/otel/metric@' github.com/moby/buildkit go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/contrib/instrumentation/net/http/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/otel/internal/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/contrib/instrumentation/net/http/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/otel/exporters/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/otel/sdk/export/[email protected] go.opentelemetry.io/otel/[email protected] go.opentelemetry.io/otel/sdk/[email protected] go.opentelemetry.io/otel/[email protected] ``` Looks like `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.31.0` is the first version taking the new metrics into account; https://github.com/open-telemetry/opentelemetry-go-contrib/blob/instrumentation/net/http/otelhttp/v0.31.0/instrumentation/net/http/otelhttp/handler.go#L52-L53 Changed in open-telemetry/opentelemetry-go-contrib@a587520 (open-telemetry/opentelemetry-go-contrib#1977) Unfortunately, updating these to v0.31.0 works around the other issues, but breaks BuildKit, which doesn't support the newer API; go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.31.0 // indirect // updated to v0.31+ to account for moby#44530 (comment) go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.31.0 // indirect // updated v0.31+ to account for moby#44530 (comment) ```bash Building static bundles/binary-daemon/dockerd (linux/arm64)... vendor/github.com/moby/buildkit/util/tracing/transform/span.go:34:26: sd.InstrumentationLibrarySpans undefined (type *"github.com/docker/docker/vendor/go.opentelemetry.io/proto/otlp/trace/v1".ResourceSpans has no field or method InstrumentationLibrarySpans) vendor/github.com/moby/buildkit/util/tracing/transform/span.go:56:17: undefined: v11.InstrumentationLibrary vendor/github.com/moby/buildkit/util/tracing/transform/instrumentation.go:9:42: undefined: commonpb.InstrumentationLibrary vendor/github.com/moby/buildkit/worker/containerd/containerd.go:56:74: cannot use &gogoptypes.Empty{} (value of type *"github.com/docker/docker/vendor/github.com/gogo/protobuf/types".Empty) as *emptypb.Empty value in argument to client.IntrospectionService().Server ``` Signed-off-by: Sebastiaan van Stijn <[email protected]>
The following Instrumentation packages use the metrics API, and are updated to v0.28.0
Note:
In v0.27.0 of the metrics API there was otel/metric/metrictest. This had a MeterProvider that did not use the SDK to record metrics in memory. That was removed from v0.28.0 and will be replaced in open-telemetry/opentelemetry-go#2722