Commit aafbabe
authored
Remove spans with ec2 metadata ip address from metrics (#1015)
*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


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

*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.1 parent 2740c56 commit aafbabe
File tree
2 files changed
+39
-1
lines changed- awsagentprovider/src
- main/java/software/amazon/opentelemetry/javaagent/providers
- test/java/software/amazon/opentelemetry/javaagent/providers
2 files changed
+39
-1
lines changedLines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
175 | | - | |
| 180 | + | |
176 | 181 | | |
177 | 182 | | |
178 | 183 | | |
179 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
180 | 194 | | |
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
378 | 379 | | |
379 | 380 | | |
380 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
381 | 397 | | |
382 | 398 | | |
383 | 399 | | |
| |||
404 | 420 | | |
405 | 421 | | |
406 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
407 | 431 | | |
408 | 432 | | |
409 | 433 | | |
| |||
0 commit comments