-
Notifications
You must be signed in to change notification settings - Fork 23
feat(instrumentation): Add gRPC instrumentation #226
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
base: main
Are you sure you want to change the base?
Conversation
📊 Semantic Convention Registry Update CheckCurrent Project Version:
🆕 Available UpdatesComparing latest (main branch) vs v1.37.0 (current) 💡 New semantic conventions are available. Consider updating if these changes are relevant to your instrumentation: 📋 View available updatesSummary of Schema ChangesRegistry versionsBaseline: unversioned Head: unversioned Registry AttributesAdded
Renamed
Uncategorized
MetricsAdded
Renamed
Obsoleted
Uncategorized
EventsAdded
📝 What This Means
How to Update (if desired):
Generated by OTel Weaver • Run |
This comment was marked as resolved.
This comment was marked as resolved.
1 similar comment
This comment was marked as resolved.
This comment was marked as resolved.
9be0dfa to
09599c0
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #226 +/- ##
=========================================
+ Coverage 0 55.46% +55.46%
=========================================
Files 0 45 +45
Lines 0 3260 +3260
=========================================
+ Hits 0 1808 +1808
- Misses 0 1314 +1314
- Partials 0 138 +138
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR adds comprehensive gRPC instrumentation support using compile-time code injection. The implementation instruments both client (grpc.NewClient, grpc.DialContext) and server (grpc.NewServer) methods to automatically collect distributed traces and metrics without requiring code changes.
Key Changes:
- Added gRPC client and server instrumentation hooks using stats.Handler injection
- Implemented semantic conventions for gRPC following OpenTelemetry v1.37.0
- Added filtering to prevent infinite recursion with OTLP gRPC exporters
- Switched to HTTP/protobuf exporter to avoid gRPC deadlock issues
Reviewed changes
Copilot reviewed 31 out of 34 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tool/data/grpc.yaml |
Hook configuration for gRPC client/server methods |
tool/internal/instrument/trampoline.go |
Added ellipsis type handling for variadic parameters |
pkg/instrumentation/grpc/server/ |
Server-side instrumentation with stats handler |
pkg/instrumentation/grpc/client/ |
Client-side instrumentation for NewClient and DialContext |
pkg/instrumentation/grpc/semconv/ |
Semantic conventions and utility functions |
pkg/otelsetup/setup.go |
Changed from gRPC to HTTP exporter to prevent deadlock |
test/integration/grpc_*_test.go |
Integration tests for client/server instrumentation |
test/e2e/grpc_test.go |
End-to-end tests |
demo/grpc/ |
Updated demo applications with structured logging |
demo/infrastructure/docker-compose/ |
Updated to use HTTP exporter and added gRPC Makefile targets |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a8f3e52 to
fb6c604
Compare
fb6c604 to
bfac024
Compare
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
163a153 to
767665a
Compare
770d755 to
99f96a9
Compare
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
99f96a9 to
891081a
Compare
Signed-off-by: Kemal Akkoyun kemal.akkoyun@datadoghq.com