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 User-Agent header to OTLP exporter requests #4784

Merged
merged 4 commits into from Oct 19, 2022

Conversation

jack-berg
Copy link
Member

Implements spec PR #2684.

@jack-berg jack-berg requested a review from a team as a code owner September 26, 2022 20:37
@codecov
Copy link

codecov bot commented Sep 26, 2022

Codecov Report

Base: 90.78% // Head: 90.84% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (c371e02) compared to base (a1cf20d).
Patch coverage: 87.50% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4784      +/-   ##
============================================
+ Coverage     90.78%   90.84%   +0.05%     
- Complexity     4822     4856      +34     
============================================
  Files           554      556       +2     
  Lines         14383    14474      +91     
  Branches       1397     1410      +13     
============================================
+ Hits          13058    13149      +91     
+ Misses          909      908       -1     
- Partials        416      417       +1     
Impacted Files Coverage Δ
...elemetry/exporter/internal/otlp/OtlpUserAgent.java 80.00% <80.00%> (ø)
...lp/http/metrics/OtlpHttpMetricExporterBuilder.java 100.00% <100.00%> (ø)
...r/otlp/http/trace/OtlpHttpSpanExporterBuilder.java 100.00% <100.00%> (ø)
...er/otlp/metrics/OtlpGrpcMetricExporterBuilder.java 100.00% <100.00%> (ø)
...porter/otlp/trace/OtlpGrpcSpanExporterBuilder.java 100.00% <100.00%> (ø)
...lp/http/logs/OtlpHttpLogRecordExporterBuilder.java 100.00% <100.00%> (ø)
...er/otlp/logs/OtlpGrpcLogRecordExporterBuilder.java 100.00% <100.00%> (ø)
...main/java/io/opentelemetry/sdk/logs/SdkLogger.java 90.00% <0.00%> (-10.00%) ⬇️
.../opentelemetry/api/logs/DefaultLoggerProvider.java 91.66% <0.00%> (-8.34%) ⬇️
...metry/sdk/autoconfigure/ResourceConfiguration.java 94.87% <0.00%> (-5.13%) ⬇️
... and 35 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jack-berg jack-berg linked an issue Oct 4, 2022 that may be closed by this pull request
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@jack-berg
Copy link
Member Author

jack-berg commented Oct 18, 2022

@jkwatson please take a look when you have a chance

@@ -9,7 +9,7 @@ plugins {
}

description = "OpenTelemetry Protocol Exporter"
otelJava.moduleName.set("io.opentelemetry.exporter.otlp.internal")
otelJava.moduleName.set("io.opentelemetry.exporter.internal.otlp")
Copy link
Contributor

Choose a reason for hiding this comment

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

what affect does this have?

Copy link
Member Author

Choose a reason for hiding this comment

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

The moduleName is used to set the location of the version.properties file. It should reflect the base package of the artifact, so in this case it was wrong. If its not correct, then fetching a relative resource like OtlpUserAgent.class.getResourceAsStream("version.properties") will fail.

@jack-berg jack-berg merged commit 1e67b05 into open-telemetry:main Oct 19, 2022
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.

OTLP exporters should emit standard user agent string
4 participants