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

OtlpExporter: HttpClientFactory option #2696

Merged
merged 14 commits into from
Nov 29, 2021

Conversation

CodeBlanch
Copy link
Member

@CodeBlanch CodeBlanch commented Nov 28, 2021

Closes #2522

Changes

  • Adds the same HttpClientFactory option we have on JaegerExporterOptions & ZipkinExporterOptions to OtlpExporterOptions.
  • Adds IHttpClientFactory integration when IDeferredTracerProviderBuilder/IDeferredMeterProviderBuilder is used.
  • Adds support for the HttpProtobuf protocol in OtlpMetricExporter.

TODOs

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests

@CodeBlanch CodeBlanch requested a review from a team November 28, 2021 02:53
@codecov
Copy link

codecov bot commented Nov 28, 2021

Codecov Report

Merging #2696 (dc3c21a) into main (381e0b8) will increase coverage by 1.09%.
The diff coverage is 91.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2696      +/-   ##
==========================================
+ Coverage   82.95%   84.05%   +1.09%     
==========================================
  Files         250      251       +1     
  Lines        8705     8778      +73     
==========================================
+ Hits         7221     7378     +157     
+ Misses       1484     1400      -84     
Impacted Files Coverage Δ
...entation/ExportClient/OtlpHttpTraceExportClient.cs 90.47% <ø> (ø)
...tation/ExportClient/OtlpHttpMetricsExportClient.cs 66.66% <66.66%> (ø)
...mentation/ExportClient/BaseOtlpHttpExportClient.cs 100.00% <100.00%> (+26.08%) ⬆️
...orter.OpenTelemetryProtocol/OtlpExporterOptions.cs 100.00% <100.00%> (ø)
...TelemetryProtocol/OtlpExporterOptionsExtensions.cs 97.80% <100.00%> (+1.80%) ⬆️
...porter.OpenTelemetryProtocol/OtlpMetricExporter.cs 72.72% <100.00%> (+72.72%) ⬆️
...nTelemetryProtocol/OtlpMetricExporterExtensions.cs 100.00% <100.00%> (+100.00%) ⬆️
...metryProtocol/OtlpTraceExporterHelperExtensions.cs 95.00% <100.00%> (+21.31%) ⬆️
src/OpenTelemetry/Metrics/MeterProviderSdk.cs 89.86% <0.00%> (+0.44%) ⬆️
...nTelemetry/Internal/OpenTelemetrySdkEventSource.cs 74.76% <0.00%> (+0.93%) ⬆️
... and 9 more

Copy link
Member

@alanwest alanwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Haven't thought it through, but this may actually be of use to the gRPC based exporters as well. At least for compilation that uses the Grpc.Net.Client library, you can set the underlying HttpClient to use. Allows for more sophisticated configuration of the channel. https://grpc.github.io/grpc/csharp-dotnet/api/Grpc.Net.Client.GrpcChannelOptions.html#Grpc_Net_Client_GrpcChannelOptions_HttpClient

@cijothomas cijothomas merged commit 2c9501f into open-telemetry:main Nov 29, 2021
@CodeBlanch CodeBlanch deleted the otlp-httpclientfactory branch December 1, 2021 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does MeterProvider support OTLP HttpExporter?
3 participants