Skip to content

Conversation

@harrryr
Copy link
Contributor

@harrryr harrryr commented Feb 7, 2025

Issue #, if available:
ADOT SDK resource detectors by default have enabled a few AWS resource detector which will call EC2 metadata API endpoints. These activities have been captured by auto-instrumentation and generated AppSignals metrics.

These calls should be present in traces, but not in metrics.

Description of changes:
Suppress AwsSpanMetricsProcessor from generating metrics when the RemoteService points to 169.254.169.254

Testing
Deployed two EC2 instance with Java sample application and ADOT Java

  • sample-application-2025-02-06-test: ADOT Java with changes in this PR
  • sample-application-2025-02-06: Public latest ADOT Java

Traces:
Present from both EC2 instance
image
image

Metrics:
Present only for sample-application-2025-02-06:
image

Logs:
Present only for sample-application-2025-02-06:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@harrryr harrryr requested a review from a team as a code owner February 7, 2025 00:33
@harrryr harrryr merged commit aafbabe into aws-observability:main Feb 13, 2025
4 checks passed
harrryr added a commit to aws-observability/aws-otel-js-instrumentation that referenced this pull request Feb 13, 2025
*Issue #, if available:*
ADOT SDK resource detectors by default have enabled a few AWS resource
detector which will call EC2 metadata API endpoints. These activities
have been captured by auto-instrumentation and generated AppSignals
metrics.

*Description of changes:*
Suppress AwsSpanMetricsProcessor from generating metrics when the
RemoteService points to 169.254.169.254

*Testing*:
Tested using Java Adot:
aws-observability/aws-otel-java-instrumentation#1015

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
harrryr added a commit to aws-observability/aws-otel-python-instrumentation that referenced this pull request Feb 13, 2025
*Issue #, if available:*
ADOT SDK resource detectors by default have enabled a few AWS resource
detector which will call EC2 metadata API endpoints. These activities
have been captured by auto-instrumentation and generated AppSignals
metrics.

*Description of changes:*
Suppress AwsSpanMetricsProcessor from generating metrics when the
RemoteService points to 169.254.169.254

*Testing*:
Tested using Java Adot:
aws-observability/aws-otel-java-instrumentation#1015

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
XinRanZhAWS pushed a commit that referenced this pull request Mar 11, 2025
*Issue #, if available:*
ADOT SDK resource detectors by default have enabled a few AWS resource
detector which will call EC2 metadata API endpoints. These activities
have been captured by auto-instrumentation and generated AppSignals
metrics.

These calls should be present in traces, but not in metrics. 

*Description of changes:*
Suppress AwsSpanMetricsProcessor from generating metrics when the
RemoteService points to `169.254.169.254`

*Testing*
Deployed two EC2 instance with Java sample application and ADOT Java 
- `sample-application-2025-02-06-test`: ADOT Java with changes in this
PR
- `sample-application-2025-02-06`: Public latest ADOT Java

*Traces:*
Present from both EC2 instance

![image](https://github.com/user-attachments/assets/9c10a81d-0336-473f-81f3-9d4e61069401)

![image](https://github.com/user-attachments/assets/8be02cc9-dddb-4461-834e-98ad65d5a23f)

*Metrics*:
Present only for `sample-application-2025-02-06`:

![image](https://github.com/user-attachments/assets/97d29884-7133-47b5-aa0e-c5ac7a09cc3e)

*Logs*:
Present only for `sample-application-2025-02-06`:




By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
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