Skip to content

OTLP exporter requires pinning protobuf 4.x / opentelemetry-sdk 1.27.0 due to grpcio-status conflict #14

Description

@anithp

Roadblock

Wiring up Python OpenTelemetry instrumentation against RocketGraph hit a dependency version constraint.

Problem

The repo pins protobuf==4.25.4 (required by the grpcio-status / firestore stack). However, OTel 1.28+ requires protobuf 5.x, which conflicts.

Resolution

  • Pinned the last protobuf-4-compatible release: opentelemetry-sdk==1.27.0 / instrumentation 0.48b0, HTTP exporter only.
  • That release imports pkg_resources, so also pinned setuptools<81 (setuptools 81 removed it).
  • protobuf stays at 4.25.4.

Verification

  • Full instrumentor set installs clean (pip check passes), all imports resolve.
  • Direct OTLP POST to /v1/traces confirmed: valid Bearer → HTTP 200; no auth → 401; bad key → 401. Endpoint, http/protobuf format, and auth all correct.
  • FastAPI gets OpenTelemetryMiddleware; span force_flush succeeded.

Notes

  • OTLP HTTP exporter used (no gRPC), reading endpoint/headers/protocol from standard OTEL_* env vars.
  • Live API key kept in .env.local (gitignored); for prod it should live in Secret Manager, not committed.
Image

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions