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

feat(trace): add TelemetryResourceDetector #899

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

TommyCpp
Copy link
Contributor

open-telemetry/opentelemetry-demo#504 needs to add telemetry.sdk.* info to the resources

@codecov
Copy link

codecov bot commented Oct 23, 2022

Codecov Report

Base: 67.0% // Head: 66.9% // Decreases project coverage by -0.0% ⚠️

Coverage data is based on head (f98e266) compared to base (5efe37a).
Patch coverage: 0.0% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #899     +/-   ##
=======================================
- Coverage   67.0%   66.9%   -0.1%     
=======================================
  Files        114     115      +1     
  Lines       8928    8935      +7     
=======================================
- Hits        5989    5986      -3     
- Misses      2939    2949     +10     
Impacted Files Coverage Δ
opentelemetry-sdk/src/resource/mod.rs 92.6% <ø> (ø)
opentelemetry-sdk/src/resource/telemetry.rs 0.0% <0.0%> (ø)
opentelemetry-http/src/lib.rs 4.3% <0.0%> (-3.3%) ⬇️

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.

Copy link
Contributor

@hdost hdost left a comment

Choose a reason for hiding this comment

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

Looks good! One minor comment.

impl ResourceDetector for TelemetryResourceDetector {
fn detect(&self, _timeout: Duration) -> Resource {
Resource::new(vec![
KeyValue::new("telemetry.sdk.name", "opentelemetry"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
KeyValue::new("telemetry.sdk.name", "opentelemetry"),
KeyValue::new("telemetry.sdk.name", "opentelemetry-sdk"),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call out, but the spec asks all opentelemetry provided SDK to use opentelemetry as the value for this key

The default OpenTelemetry SDK provided by the OpenTelemetry project MUST set telemetry.sdk.name to the value opentelemetry

Copy link
Contributor

@hdost hdost left a comment

Choose a reason for hiding this comment

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

The comment could honestly be done in a follow up.

@TommyCpp TommyCpp merged commit d421aab into open-telemetry:main Oct 24, 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.

2 participants