Skip to content

Support exporting OTLP over gRPC #1090

@jbergstroem

Description

@jbergstroem

Is your feature request related to a problem? Please describe.
The OTLP exporter for tracers, logs and metrics currently are hardcoded to use HTTP. It would be great if it optionally supported gRPC as well:

func NewOTLP(endpoint string, insecure bool, urlpath string) (metric.Exporter, error) {
options := []otlpmetrichttp.Option{
otlpmetrichttp.WithCompression(otlpmetrichttp.GzipCompression),
otlpmetrichttp.WithEndpoint(endpoint),
}

Describe the solution you'd like

  1. expand the meter/logging/tracing config with a sub object called oltp containing protocol (if this is the only option that supports gRPC. If supported by multiple libraries I'd keep it at the top level.
  2. branch on above option (which defaults to http) and invoke the different exporter.

Describe alternatives you've considered
Stick with HTTP

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions