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
- 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.
- branch on above option (which defaults to http) and invoke the different exporter.
Describe alternatives you've considered
Stick with HTTP
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:
permify/pkg/telemetry/meterexporters/otlp.go
Lines 11 to 15 in c4e26ce
Describe the solution you'd like
oltpcontainingprotocol(if this is the only option that supports gRPC. If supported by multiple libraries I'd keep it at the top level.Describe alternatives you've considered
Stick with HTTP