[feature request] Able to config GrpcChannel like HttpClient #5923
Labels
enhancement
New feature or request
pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol
Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
Milestone
Package
OpenTelemetry.Exporter.OpenTelemetryProtocol
Is your feature request related to a problem?
We have a project based on .Net Framework 4.8 and grpc over HTTP (grpc-web). We want to build a custom collector based on the proto files with .net 8 and enable the
grpc-web
support. TheOpenTelemetryProtocol
package does not support it. I wonder if we can add an option likeHttpClient
forGrpcChannel
.Client code to support grpc-web is similar to this: https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/test/test-applications/integrations/TestApplication.GrpcNetClient/Program.cs#L51
Here I created a repo to reproduce the issue: https://github.com/LeuisKen/OTLPGrpcWeb
If you start the OTLPGrpcService, which listens to
http://localhost:4317
, and run the OTLPConsoleApp console app, no logs are sent to the service.Here is the error inside the response:
What is the expected behavior?
Add a new
GrpcChannel
option like theHttpClient
option we have. Then we can customize the behavior of Grpc channel, no matter we are using HttpHandler or WinHttpHandler.Which alternative solutions or features have you considered?
Not yet.
Additional context
If you like the proposal, I'll be glad to create a PR to implement it.
The text was updated successfully, but these errors were encountered: