Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support gRPC #210

Closed
michaelbushe opened this issue Jan 18, 2025 · 1 comment
Closed

Support gRPC #210

michaelbushe opened this issue Jan 18, 2025 · 1 comment

Comments

@michaelbushe
Copy link

Overview

The OpenTelemetry Protocol (OTLP) specification recommends supporting both gRPC (port 4317) and HTTP (port 4318) transports, with gRPC being the preferred default. Currently, the library only supports HTTP transport. This enhancement would add gRPC support to align with the specification recommendations.

Background

  • OTLP specification recommends implementations support both protocols
  • gRPC offers advantages like streaming support and better connection management
  • Many OpenTelemetry backends (Elastic, NewRelic, etc.) prefer gRPC connections
  • Current implementation only supports HTTP/protobuf transport

Proposed Changes

  1. Add gRPC transport implementation:

    • Implement gRPC client for OTLP export
    • Support configuration of transport type (gRPC vs HTTP)
    • Default to gRPC when available, fallback to HTTP
  2. Keep existing HTTP transport as fallback:

    • Maintain backward compatibility
    • Support environments where gRPC might be blocked

We will make these changes and contribute a PR.

Technical Details

  • Will use Dart's grpc and protobuf packages
  • Need to support both sync and async span processors
  • Will maintain compatibility with existing collector configurations

Questions

  • Should we generate protobuf files from official OpenTelemetry protos or include pre-generated ones?
  • Preference for how to configure transport type in the SDK?

References

@michaelbushe
Copy link
Author

Whoops, I missed this issue which is a duplicate:
#161
What's the status of that request, it's 8 months old and needs a review.

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

No branches or pull requests

1 participant