-
Notifications
You must be signed in to change notification settings - Fork 1k
Emit schema url from HTTP instrumentations #15144
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
Changes from all commits
264210e
d8a5ef8
f8cbed7
d945a1d
a416dcb
a9c2003
f3efe97
1e42dfe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,7 @@ | |
| import io.opentelemetry.instrumentation.api.semconv.http.HttpSpanNameExtractor; | ||
| import io.opentelemetry.instrumentation.api.semconv.http.HttpSpanNameExtractorBuilder; | ||
| import io.opentelemetry.instrumentation.api.semconv.http.HttpSpanStatusExtractor; | ||
| import io.opentelemetry.semconv.SchemaUrls; | ||
| import java.util.ArrayList; | ||
| import java.util.Collection; | ||
| import java.util.List; | ||
|
|
@@ -245,7 +246,8 @@ public Instrumenter<REQUEST, RESPONSE> build() { | |
| statusExtractorTransformer.apply(HttpSpanStatusExtractor.create(attributesGetter))) | ||
| .addAttributesExtractor(httpAttributesExtractorBuilder.build()) | ||
| .addAttributesExtractors(additionalExtractors) | ||
| .addOperationMetrics(HttpClientMetrics.get()); | ||
| .addOperationMetrics(HttpClientMetrics.get()) | ||
| .setSchemaUrl(SchemaUrls.V1_37_0); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does setting schema url pose any additional restrictions to what we can do with these instrumentations?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can still emit additional attributes if that what you're asking? |
||
| if (emitExperimentalHttpClientTelemetry) { | ||
| builder | ||
| .addAttributesExtractor(HttpExperimentalAttributesExtractor.create(attributesGetter)) | ||
|
|
@@ -263,7 +265,9 @@ public Instrumenter<REQUEST, RESPONSE> build() { | |
| public <BUILDERREQUEST, BUILDERRESPONSE> | ||
| InstrumenterBuilder<BUILDERREQUEST, BUILDERRESPONSE> instrumenterBuilder( | ||
| SpanNameExtractor<? super BUILDERREQUEST> spanNameExtractor) { | ||
| return Instrumenter.builder(openTelemetry, instrumentationName, spanNameExtractor); | ||
| return Instrumenter.<BUILDERREQUEST, BUILDERRESPONSE>builder( | ||
| openTelemetry, instrumentationName, spanNameExtractor) | ||
| .setSchemaUrl(SchemaUrls.V1_37_0); | ||
| } | ||
|
|
||
| @CanIgnoreReturnValue | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.