open-telemetry / opentelemetry-dotnet

The OpenTelemetry .NET Client
https://opentelemetry.io
Apache License 2.0
3.23k stars 765 forks source link

Add Protobuf bindings as a package - OpenTelemetry.Proto #5805

Closed mlavrent closed 2 months ago

mlavrent commented 2 months ago

Design discussion issue #5794

Changes

Currently, the OpenTelemetry protobuf definitions are provided here.

Other languages provide bindings for these protobuf models as a package in their respective packaging systems:

[Python](https://pypi.org/project/opentelemetry-proto/)
[Go](https://github.com/open-telemetry/opentelemetry-proto-go)
[Java](https://github.com/open-telemetry/opentelemetry-proto-java)
[Rust](https://crates.io/crates/opentelemetry-proto/0.1.0)

This may be useful for folks wishing to write their own custom OTLP receiver or otherwise serialize/deserialize using the protobuf definitions. We could also factor the serialization/deserialization logic and protobuf files out from the OTLP exporter in a future PR (potentially moving the encoding/decoding logic to this package too).

Propose to call this package OpenTelemetry.Proto, and essentially add opentelemetry-proto as a submodule.

Want to hear your thoughts on if this is worth doing - if so, I'm happy to take this on to support some things I'm looking to do with this package as a standalone (as opposed to using it as part of the OTLP exporter).

Merge requirement checklist

linux-foundation-easycla[bot] commented 2 months ago

CLA Signed


The committers listed above are authorized under a signed CLA.

vishweshbankwar commented 2 months ago

@mlavrent - Thank you for your PR - I just responded on https://github.com/open-telemetry/opentelemetry-dotnet/discussions/5794. We are not planning to add/support it at the moment. For .NET, the goal is to remove the dependencies from these classes and implement a custom serializer(https://github.com/open-telemetry/opentelemetry-dotnet/issues/5730).

Kielek commented 2 months ago

Closing, base on @vishweshbankwar comment.

CodeBlanch commented 2 months ago

@mlavrent If you still want to have this standalone package I think it would be fine to have over on https://github.com/open-telemetry/opentelemetry-dotnet-contrib. We probably won't take it as a dependency for anything in this repo but that doesn't mean it couldn't be out there for users to consume for their own purposes.

mlavrent commented 2 months ago

Sweet @CodeBlanch - I'll see if I can add this there in the meantime as a stop-gap before the custom protobuf serializer is developed over here :).