-
Notifications
You must be signed in to change notification settings - Fork 56
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: Add auto-instrumentation support for Step Functions, SNS, Secre… #899
Conversation
…tsManager, and Lambda
...main/java/software/amazon/opentelemetry/javaagent/providers/AwsMetricAttributeGenerator.java
Outdated
Show resolved
Hide resolved
.../java/software/amazon/opentelemetry/javaagent/providers/AwsMetricAttributeGeneratorTest.java
Show resolved
Hide resolved
… of existing resources
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #899 +/- ##
=============================================
- Coverage 85.71% 74.34% -11.38%
- Complexity 19 273 +254
=============================================
Files 3 19 +16
Lines 49 951 +902
Branches 5 141 +136
=============================================
+ Hits 42 707 +665
- Misses 3 202 +199
- Partials 4 42 +38 ☔ View full report in Codecov by Sentry. |
*Issue #, if available:* Main-build Enablement E2E tests started failing starting from this [PR](#899). It was due to the usage of `isEmpty()` for Optional datatypes, which is available only from Java 11 *Description of changes:* Change .isEmpty() to .isPresent() for optional types By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Co-authored-by: Min Xia <xiami@amazon.com>
Description of changes:
Changes in ADOT package to support new AWS resources in Java V1 & V2 SDKs.
Related changes for V1 SDK in upstream package: mxiamxia/opentelemetry-java-instrumentation#11
Related changes for V2 SDK in upstream package: mxiamxia/opentelemetry-java-instrumentation#12
These changes add auto-instrumentation support for the following AWS resources. Additionally, a new attribute for
aws.remote.resource.cfn.primary.identifier
is also added for each new resource.aws.sns.topic.arn
in Span by extractingTopicArn
from the request body.https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html
aws.secretsmanager.secret.arn
in Span by extractingARN
from response body.https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secret.html
aws.stepfunctions.state_machine.arn
in Span by extractingstateMachineArn
from the request body.https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html
aws.stepfunctions.activity.arn
in Span by extractingactivityArn
from the request body.https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html
aws.lambda.function.name
in Span by extractingFunctionName
from the request body.https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html
aws.lambda.resource_mapping.id
in Span by extractingUUID
from the request body.https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
Test Plan:
Set up a client-server with auto-instrumentation to verify that the correct span data is being generated.
Note: V1 span data is top pic and V2 span data is bottom pic for each resource.
aws.lambda.function.name
aws.lambda.resource_mapping.id
aws.secretsmanager.secret.arn
aws.sns.topic.arn
aws.stepfunctions.activity.arn
aws.stepfunction.state_machine.arn
Metric Attribute Generator Unit Test
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.