-
Notifications
You must be signed in to change notification settings - Fork 782
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
Make OtlpExporterOptions.HttpClientFactory work with GRPC protocol #4625
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4625 +/- ##
==========================================
+ Coverage 84.90% 84.93% +0.02%
==========================================
Files 313 313
Lines 12609 12616 +7
==========================================
+ Hits 10706 10715 +9
+ Misses 1903 1901 -2
|
Thanks @dhhoang The proposed change looks reasonable to me, was going to send the same PR shortly 😆 Adding @alanwest @CodeBlanch @utpilla to share feedback on proposal before reviewing. |
@dhhoang Supporting the HttpClientFactory option with the gRPC exporter is something we're considering. Though, if your need is primarily with the lack of support for client certificates, I think I'd be interested if we first pursued the configuration options currently missing that are required by the spec: Certificate file, Client key file, and Client certificate file. |
@alanwest I'm actually about to send another PR to enable these configs, since they're needed for mTLS to work with .NET Framework targets. |
Sounds good! For now, I think we could definitely proceed with the addition of the missing config options. |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Fixes #2120, #2009
Design discussion issue #3393
Changes
The purpose is to make it possible to control how
HttpClient
is created when using GRPC protocol. A common use case is to submit a client certificate, for example, to use with mTLS. The changes include:OtlpExporterOptions.HttpClientFactory
option work withOtlpExportProtocol.Grpc
protocol, instead of justOtlpExportProtocol.HttpProtobuf
.HttpClient
instance is created once when the channel is created, and it is passed toGrpcChannelOptions
.IHttpClientFactory
is also supported for GRPC in much the same way it is for HttpProtobuf.Usage
The following code shows how to setup client certificate with this option enabled.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes