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

[feature request] Able to config GrpcChannel like HttpClient #5923

Open
LeuisKen opened this issue Oct 24, 2024 · 0 comments
Open

[feature request] Able to config GrpcChannel like HttpClient #5923

LeuisKen opened this issue Oct 24, 2024 · 0 comments
Labels
enhancement New feature or request pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
Milestone

Comments

@LeuisKen
Copy link

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. The OpenTelemetryProtocol package does not support it. I wonder if we can add an option like HttpClient for GrpcChannel.

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:

image

Status(StatusCode="Unavailable", Detail="failed to connect to all addresses", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1729793704.966000000","description":"Failed to pick subchannel","file":"..\..\..\src\core\ext\filters\client_channel\client_channel.cc","file_line":3129,"referenced_errors":[{"created":"@1729793704.966000000","description":"failed to connect to all addresses","file":"..\..\..\src\core\lib\transport\error_utils.cc","file_line":163,"grpc_status":14}]}")

What is the expected behavior?

Add a new GrpcChannel option like the HttpClient option we have. Then we can customize the behavior of Grpc channel, no matter we are using HttpHandler or WinHttpHandler.

image

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.

@LeuisKen LeuisKen added enhancement New feature or request needs-triage New issues which have not been classified or triaged by a community member labels Oct 24, 2024
@github-actions github-actions bot added the pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package label Oct 24, 2024
@TimothyMothra TimothyMothra removed the needs-triage New issues which have not been classified or triaged by a community member label Oct 24, 2024
@TimothyMothra TimothyMothra added this to the Future milestone Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
Projects
None yet
Development

No branches or pull requests

2 participants