Pure-Python otlp-proto-common encoding (no protobuf) [2/4 RFC] - #5504
Draft
ocelotl wants to merge 2 commits into
Draft
Pure-Python otlp-proto-common encoding (no protobuf) [2/4 RFC]#5504ocelotl wants to merge 2 commits into
ocelotl wants to merge 2 commits into
Conversation
Swap the google.protobuf-generated message classes for hand-written pure-Python encoders under opentelemetry._proto, keeping the public opentelemetry.proto.* import namespace via thin re-export shims. Removes the protobuf (and native upb) dependency entirely; only the serialize path used by the OTLP exporters is implemented (plus the empty export-service response decode).
Point the shared OTLP encoders at the pure-Python opentelemetry-proto package. No google.protobuf dependency; public opentelemetry.exporter.otlp.proto.common.* API preserved via re-export shims over the private _proto implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Point
opentelemetry-exporter-otlp-proto-common(the shared OTLP encoders for traces/metrics/logs) at the pure-Python protobuf backend from #5503. Nogoogle.protobufanywhere in the OTLP encode path.The public
opentelemetry.exporter.otlp.proto.common.*API is preserved via re-export shims over a privateopentelemetry.exporter.otlp._proto.commonimplementation, mirroring the structure used foropentelemetry-protoin #5503.Stacked series (merge in order)
opentelemetry-proto→ pure-Pythonopentelemetry-exporter-otlp-proto-common→ pure-Python backend (this PR)opentelemetry-exporter-otlp-proto-http→ pure-Python + stdliburllibopentelemetry-exporter-otlp-proto-grpc→ pure-Python gRPCThis PR depends on #5503 and its diff includes #5503's changes (cumulative, since we can't host intermediate base branches in the upstream repo). To review only the common-package changes, see the fork compare:
https://github.com/ocelotl/opentelemetry-python/compare/pure-python-otlp-1-proto...pure-python-otlp-2-commonNotes
opentelemetry-proto == 1.45.0.dev(now the pure-Python package).Stack (merge in order): #5503 (proto) → #5504 (common) → #5505 (http) → #5506 (grpc)