Skip to content

feat: grpc instrumentation for outbound requests#26

Merged
sohankshirsagar merged 9 commits into
mainfrom
sohan/grpc-outbound
Oct 12, 2025
Merged

feat: grpc instrumentation for outbound requests#26
sohankshirsagar merged 9 commits into
mainfrom
sohan/grpc-outbound

Conversation

@sohankshirsagar
Copy link
Copy Markdown
Contributor

@sohankshirsagar sohankshirsagar commented Oct 10, 2025

Notable changes

  • Added grpc instrumentation for outbound requests
    • The instrumentation code for grpc inbound (server) requests is commented out
      • It is functional, but still need to test more
      • This will require more changes to replay grpc inbound requests
  • Replaced NodeSDK with NodeTracerProvider
    • Changed from using OpenTelemetry's NodeSDK to NodeTracerProvider to avoid importing the @grpc/grpc-js package, which was interfering with our gRPC instrumentation
  • Removed unused packages from package.json

Note

Adds outbound gRPC (@grpc/grpc-js) instrumentation with tests/docs and switches tracing from NodeSDK to NodeTracerProvider.

  • Instrumentation (gRPC):
    • Add GrpcInstrumentation for outbound client calls (@grpc/grpc-js), including metadata/payload (Buffer) serialization utilities and types.
    • New integration tests and E2E test apps (CJS/ESM), proto files, and example server/clients; grpc-server added to docker-compose.test.yml.
    • Add grpc to exported libraries and module name list.
  • Tracing/Core:
    • Replace OpenTelemetry NodeSDK with NodeTracerProvider + BatchSpanProcessor and Resource/service.name; initialize tracing after registering instrumentations; register GrpcInstrumentation.
  • CI/Docs:
    • CI: use npm ci in test workflow; add postinstall script for patch-package.
    • README: list GRPC support; CONTRIBUTING/E2E guide tidy-ups.
  • Dependencies:
    • Swap @opentelemetry/sdk-node/instrumentation packages for @opentelemetry/sdk-trace-node/resources; add dev deps @grpc/grpc-js and @grpc/proto-loader; remove unused protobuf-related deps.

Written by Cursor Bugbot for commit 728d846. This will update automatically on new commits. Configure here.

@sohankshirsagar sohankshirsagar marked this pull request as ready for review October 10, 2025 22:19
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@sohankshirsagar sohankshirsagar merged commit 91e46cc into main Oct 12, 2025
3 checks passed
@sohankshirsagar sohankshirsagar deleted the sohan/grpc-outbound branch October 12, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants