-
Notifications
You must be signed in to change notification settings - Fork 104
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
Migrate collector self-observability from OpenCensus to OpenTelemetry #885
Migrate collector self-observability from OpenCensus to OpenTelemetry #885
Conversation
…llector exporters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #885 +/- ##
==========================================
+ Coverage 61.03% 62.85% +1.82%
==========================================
Files 56 57 +1
Lines 5903 6004 +101
==========================================
+ Hits 3603 3774 +171
+ Misses 2143 2068 -75
- Partials 157 162 +5 ☔ View full report in Codecov by Sentry. |
exporter/collector/config.go
Outdated
@@ -266,7 +266,7 @@ func generateClientOptions(ctx context.Context, clientCfg *ClientConfig, cfg *Co | |||
// option.WithGRPCConn option takes precedent over all other supplied options so the | |||
// following user agent will be used by both exporters if we reach this branch | |||
dialOpts := []grpc.DialOption{ | |||
grpc.WithStatsHandler(&ocgrpc.ClientHandler{}), | |||
// TODO: use meterProvider for gRPC instrumentation |
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.
@aabmass @damemi The only thing left for this PR is to choose to use either the gRPC or go-contrib library here. I tried to use the gRPC version, but it hasn't actually been released yet: https://pkg.go.dev/google.golang.org/grpc/stats/opentelemetry (notice the tag is just a commit).
@zasweq do you know if the grpc OpenTelemetry metrics plugin is ready to be used by other projects, or when you expect the first release to be tagged?
This is ready for review |
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.
looks good, couple nits
Fixes #797
Changes
This migrates two uses of OpenCensus:
This includes:
This PR additionally includes extending self-observability fixtures to the log and trace exporters for additional coverage.
Notes to reviewers
It is probably easiest to review each commit. Most of the diff is from generated fixture changes.
Alternatives considered:
We could have used otelgrpc instead (go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc). This PR uses the grpc instrumentation because we expect the native instrumentation to eventually replace the opentelemetry-provided library.