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 user provided grpc CallInvoker #5028

Open
Kadajski opened this issue Nov 7, 2023 · 1 comment
Open

Support user provided grpc CallInvoker #5028

Kadajski opened this issue Nov 7, 2023 · 1 comment
Labels
enhancement New feature or request pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package

Comments

@Kadajski
Copy link

Kadajski commented Nov 7, 2023

Feature Request

It would be great if we could have a Func<CallInvoker> for the grpc protocol similar to the current Func<HttpClient> HttpClientFactory for http protocol. There are numerous cases where customising the grpc client is valuable and right now there is not much flexibility in terms of customising the grpc channel. The grpc CallInvoker would allow custom interceptors, clientside load balancing configuration, retry strategy configuration, custom error handling, etc which are all currently not supported in openteletry-dotnet from what I can see

Is your feature request related to a problem?
No

Describe the solution you'd like:
OtlpExporterOptions.cs to be extended with a new property public Func<CallInvoker> GrpcCallInvoker { get; set; } which, when provided, will be used instead of the internal Channel that lives inside of BaseOtlpGrpcExportClient<TRequest>. Allowing for the consumer of the OpenTelemetry.Exporter.OpenTelemetryProtocol package to configure the grpc client as they wish

Describe alternatives you've considered.
The alternative may be to provide a lot of additional options for every feature that may be requested such as #3272, #1779, or for the consumers to need to implement the entire exporter themselves. Another option may be to expose some support for Grpc.Net.ClientFactory although this would only work for framework versions that support grpc-dotnet.

Additional Context

My company already has a bunch of tooling around grpc which generates our own grpc client factory which wraps the CallInvoker with a set of interceptors and configuration which has worked very well for us. It would be great if we could re-use this tooling for OpenTelemetry.Exporter.OpenTelemetryProtocol as right now anytime we see grpc client issues in opentelemetry-dotnet there is very little flexibility in terms of options for us to tweak to improve ths

@Kadajski Kadajski added the enhancement New feature or request label Nov 7, 2023
@cijothomas cijothomas added the pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package label Nov 7, 2023
@cvi-mft
Copy link

cvi-mft commented May 22, 2024

This seems like a good candidate #4815. It's sad it was closed due to inactivitity. Is it possible to revive that PR?

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

3 participants