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(otlp,sdk): add schema_url to tracer. #743

Merged
merged 3 commits into from Mar 1, 2022

Conversation

TommyCpp
Copy link
Contributor

part of #711

We have already introduced the schema_url parameters when we created the tracer. This PR pass it to the protos when exporting in OTLP format. See https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto#L71-L72

@TommyCpp TommyCpp requested a review from a team as a code owner February 22, 2022 01:23
@jtescher
Copy link
Member

@TommyCpp should we add this to the InstrumentationLibrary struct directly?

@codecov
Copy link

codecov bot commented Feb 22, 2022

Codecov Report

Merging #743 (46e6a58) into main (104d66d) will increase coverage by 0.08%.
The diff coverage is 91.17%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #743      +/-   ##
==========================================
+ Coverage   70.12%   70.20%   +0.08%     
==========================================
  Files         108      108              
  Lines        8789     8804      +15     
==========================================
+ Hits         6163     6181      +18     
+ Misses       2626     2623       -3     
Impacted Files Coverage Δ
opentelemetry-api/src/metrics/observer.rs 60.00% <ø> (ø)
opentelemetry-sdk/src/trace/tracer.rs 90.81% <ø> (ø)
opentelemetry-api/src/metrics/config.rs 51.61% <50.00%> (+1.61%) ⬆️
opentelemetry-api/src/global/metrics.rs 83.33% <60.00%> (ø)
opentelemetry-api/src/common.rs 85.12% <100.00%> (+0.25%) ⬆️
opentelemetry-api/src/metrics/counter.rs 100.00% <100.00%> (ø)
opentelemetry-api/src/metrics/descriptor.rs 77.35% <100.00%> (+5.66%) ⬆️
opentelemetry-api/src/metrics/meter.rs 100.00% <100.00%> (ø)
opentelemetry-api/src/metrics/noop.rs 41.50% <100.00%> (ø)
opentelemetry-api/src/metrics/registry.rs 49.41% <100.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 104d66d...46e6a58. Read the comment docs.

@TommyCpp
Copy link
Contributor Author

@TommyCpp should we add this to the InstrumentationLibrary struct directly?

Good point. But I think semantically it isn't used to describe the instrumentation library. Also, we will need to add it to Resource which doesn't have an instrumentation library so I feel it may be wired if we have schema_url as part of the instrumentation library in tracer but as a stand-alone attribute in Resource.

Maybe we can remove the instrumentation library as a struct and just use instrumentation_name and instrumentation_version? I can open a separate PR if that sounds more elegant.

@jtescher
Copy link
Member

@TommyCpp other impls seem to add it to both InstrumentationLibrary as well as Resource, that's probably the simplest path. e.g. https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/common/src/main/java/io/opentelemetry/sdk/resources/ResourceBuilder.java#L21-L22 and https://github.com/open-telemetry/opentelemetry-go/blob/main/sdk/resource/resource.go#L35-L36

opentelemetry-proto/src/transform/traces.rs Outdated Show resolved Hide resolved
opentelemetry-proto/src/transform/traces.rs Outdated Show resolved Hide resolved
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.

None yet

2 participants