-
Notifications
You must be signed in to change notification settings - Fork 1k
Add instrumentation for spring-cloud-aws SqsListener annotation #12314
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 4 commits
aa46d2a
927f3ea
8b88e6f
645e3e3
d4575d8
7aa0c64
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 |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.instrumentation.awssdk.v2_2; | ||
| package io.opentelemetry.instrumentation.awssdk.v2_2.internal; | ||
|
|
||
| import static java.util.Collections.emptyList; | ||
| import static java.util.Collections.singletonList; | ||
|
|
@@ -31,7 +31,11 @@ | |
| import software.amazon.awssdk.core.interceptor.ExecutionAttributes; | ||
| import software.amazon.awssdk.core.interceptor.SdkExecutionAttribute; | ||
|
|
||
| final class AwsSdkInstrumenterFactory { | ||
| /** | ||
| * This class is internal and is hence not for public use. Its APIs are unstable and can change at | ||
| * any time. | ||
| */ | ||
| public final class AwsSdkInstrumenterFactory { | ||
|
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. Sorry, I don't understand here very much. Could you explain more about adjustment of visibility here? BTW, if necessary, add same comment on https://github.com/laurit/opentelemetry-java-instrumentation/blob/645e3e3c8658c9231c7327d035a4773743236dc1/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/SqsAdviceBridge.java#L8 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. This class is used by |
||
| private static final String INSTRUMENTATION_NAME = "io.opentelemetry.aws-sdk-2.2"; | ||
|
|
||
| private static final AttributesExtractor<ExecutionAttributes, Response> rpcAttributesExtractor = | ||
|
|
@@ -74,7 +78,7 @@ final class AwsSdkInstrumenterFactory { | |
| private final boolean messagingReceiveInstrumentationEnabled; | ||
| private final boolean useXrayPropagator; | ||
|
|
||
| AwsSdkInstrumenterFactory( | ||
| public AwsSdkInstrumenterFactory( | ||
| OpenTelemetry openTelemetry, | ||
| @Nullable TextMapPropagator messagingPropagator, | ||
| List<String> capturedHeaders, | ||
|
|
@@ -89,7 +93,7 @@ final class AwsSdkInstrumenterFactory { | |
| this.useXrayPropagator = useXrayPropagator; | ||
| } | ||
|
|
||
| Instrumenter<ExecutionAttributes, Response> requestInstrumenter() { | ||
| public Instrumenter<ExecutionAttributes, Response> requestInstrumenter() { | ||
| return createInstrumenter( | ||
| openTelemetry, | ||
| AwsSdkInstrumenterFactory::spanName, | ||
|
|
@@ -118,7 +122,7 @@ private <REQUEST, RESPONSE> AttributesExtractor<REQUEST, RESPONSE> messagingAttr | |
| .build(); | ||
| } | ||
|
|
||
| Instrumenter<SqsReceiveRequest, Response> consumerReceiveInstrumenter() { | ||
| public Instrumenter<SqsReceiveRequest, Response> consumerReceiveInstrumenter() { | ||
| MessageOperation operation = MessageOperation.RECEIVE; | ||
| SqsReceiveRequestAttributesGetter getter = SqsReceiveRequestAttributesGetter.INSTANCE; | ||
| AttributesExtractor<SqsReceiveRequest, Response> messagingAttributeExtractor = | ||
|
|
@@ -133,7 +137,7 @@ Instrumenter<SqsReceiveRequest, Response> consumerReceiveInstrumenter() { | |
| messagingReceiveInstrumentationEnabled); | ||
| } | ||
|
|
||
| Instrumenter<SqsProcessRequest, Response> consumerProcessInstrumenter() { | ||
| public Instrumenter<SqsProcessRequest, Response> consumerProcessInstrumenter() { | ||
| MessageOperation operation = MessageOperation.PROCESS; | ||
| SqsProcessRequestAttributesGetter getter = SqsProcessRequestAttributesGetter.INSTANCE; | ||
|
|
||
|
|
@@ -185,7 +189,7 @@ public void onEnd( | |
| return result; | ||
| } | ||
|
|
||
| Instrumenter<ExecutionAttributes, Response> producerInstrumenter() { | ||
| public Instrumenter<ExecutionAttributes, Response> producerInstrumenter() { | ||
| MessageOperation operation = MessageOperation.PUBLISH; | ||
| SqsAttributesGetter getter = SqsAttributesGetter.INSTANCE; | ||
| AttributesExtractor<ExecutionAttributes, Response> messagingAttributeExtractor = | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.