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

Add toString to OTLP exporters #5686

Merged
merged 3 commits into from
Aug 9, 2023

Conversation

jack-berg
Copy link
Member

#5680 and #5652 opened the door to an easy toString implementation on OTLP exporters. This continues down the path of making it easier to diagnose the configuration of OpenTelemetrySdk, since the otel java agent or any other application can log OpenTelemetrySdk#toString().

Another nice side affect of this is that it makes it easier to compare configured instances of the OTLP exporters (i.e. from file configuration) without a bunch of reflective introspection to examine internal fields.

Note, in order to avoid printing secrets, I print all headers as {header-name}=OBFUSCATED. Better to be overly restrictive about what we print than accidentally print some secret because we misidentify a header as safe to print.

@jack-berg jack-berg requested a review from a team August 7, 2023 18:20
@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Patch coverage: 82.92% and project coverage change: -0.04% ⚠️

Comparison is base (d4a3b3b) 91.34% compared to head (3aaa0e0) 91.31%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5686      +/-   ##
============================================
- Coverage     91.34%   91.31%   -0.04%     
- Complexity     4997     5010      +13     
============================================
  Files           554      554              
  Lines         14793    14834      +41     
  Branches       1379     1383       +4     
============================================
+ Hits          13513    13546      +33     
- Misses          883      887       +4     
- Partials        397      401       +4     
Files Changed Coverage Δ
...ry/exporter/internal/http/HttpExporterBuilder.java 89.24% <76.47%> (-2.86%) ⬇️
...ry/exporter/internal/grpc/GrpcExporterBuilder.java 95.37% <83.33%> (-3.52%) ⬇️
...rter/otlp/http/logs/OtlpHttpLogRecordExporter.java 83.33% <100.00%> (+1.51%) ⬆️
...rter/otlp/http/metrics/OtlpHttpMetricExporter.java 87.50% <100.00%> (+0.83%) ⬆️
...exporter/otlp/http/trace/OtlpHttpSpanExporter.java 83.33% <100.00%> (+1.51%) ⬆️
.../exporter/otlp/logs/OtlpGrpcLogRecordExporter.java 83.33% <100.00%> (+1.51%) ⬆️
.../exporter/otlp/metrics/OtlpGrpcMetricExporter.java 87.50% <100.00%> (+0.83%) ⬆️
...etry/exporter/otlp/trace/OtlpGrpcSpanExporter.java 83.33% <100.00%> (+1.51%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…nal/http/HttpExporterBuilder.java

Co-authored-by: Mateusz Rzeszutek <[email protected]>
@jack-berg jack-berg merged commit 37f901a into open-telemetry:main Aug 9, 2023
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.

3 participants