Skip to content

Support grpc export in the SDK - #4825

Merged
plengauer merged 1 commit into
ccr-51cfecf3-f9m5wifrom
ccr-51cfecf3-f9m5wi-grpc
Nov 29, 2026
Merged

plengauer merged 1 commit into
ccr-51cfecf3-f9m5wifrom
ccr-51cfecf3-f9m5wi-grpc

Conversation

@plengauer

@plengauer plengauer commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #4823: this PR merges into that PR's branch (ccr-51cfecf3-f9m5wi), which in turn targets main.

Summary

  • sdk.py uses the OTLP gRPC exporters for traces, metrics and logs when OTEL_EXPORTER_OTLP_<SIGNAL>_PROTOCOL or OTEL_EXPORTER_OTLP_PROTOCOL is grpc. The default stays http/protobuf.
  • opentelemetry-exporter-otlp-proto-grpc==1.45.2 is added to src/opt/opentelemetry_shell/requirements.txt with a platform marker (x86_64 and aarch64 only). grpcio has no wheels for other architectures such as s390x, ppc64le and riscv64, and this file is installed on every supported architecture at install time. If the gRPC exporter is not installed, selecting grpc raises an error that says so.
  • README documents the supported protocols and the architecture limit.

Deep injections

No code change needed:

  • Python: agent.instrumentation.python/requirements.txt already installs opentelemetry-exporter-otlp, which includes the gRPC exporter, and the upstream distro maps otlp plus grpc to it.
  • Node: @opentelemetry/sdk-node 0.301.2 selects the gRPC exporter for grpc.
  • Java: the pinned opentelemetry-javaagent 2.33.1 jar contains the OTLP gRPC span exporter classes.

Testing

Spot checks against a local OTLP/gRPC server: sdk.py, opentelemetry-instrument (Python) and the repo's deep.instrument.js (Node) each delivered a span with grpc, and none did with the protocol unset. Java was only checked for the exporter classes in the jar. Proper automated tests are still to come.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WAy2Nd125UZo16UXmXfMf9

Select the OTLP gRPC exporters when OTEL_EXPORTER_OTLP_PROTOCOL (or the
signal specific variant) is grpc. The default stays http/protobuf. The
gRPC exporter is only installed on x86_64 and aarch64, because grpcio
provides no wheels for other architectures.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WAy2Nd125UZo16UXmXfMf9
@plengauer plengauer self-assigned this Nov 29, 2026
@plengauer
plengauer changed the base branch from ccr-51cfecf3-f9m5wi to main November 29, 2026 09:42
@plengauer
plengauer marked this pull request as ready for review November 29, 2026 09:42
@plengauer
plengauer requested a review from moflwi as a code owner November 29, 2026 09:42
@plengauer
plengauer enabled auto-merge (squash) November 29, 2026 09:42
@plengauer
plengauer changed the base branch from main to ccr-51cfecf3-f9m5wi November 29, 2026 09:44
@plengauer
plengauer merged commit e73c7a7 into ccr-51cfecf3-f9m5wi Nov 29, 2026
4 checks passed
@plengauer
plengauer deleted the ccr-51cfecf3-f9m5wi-grpc branch November 29, 2026 09:44
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