Commit 47ce3b1
authored
Replace stringLeading method with Java 8 friendlty alternative (#902)
*Issue #, if available:*
The stringLeading method is only available in Java 11+. This doesn't
meet our requirement of ADOT Java being available for Java 8+. We need
to find an alternative method.
*Description of changes:*
Refactor code to be Java 8 friendlty
*Test run:*
https://github.com/aws-observability/aws-otel-java-instrumentation/actions/runs/11158858146
*Note*
Previously, the test was failing Java 8 for EKS use case. With this new
change, it is passing now.
This proves that:
1. The function `getDBStatementRemoteOperation`, specfically
`stripLeading()` is being tested by E2E test
2. The new change does not affect Java 11+ and also fixes Java 8
Unit tests also show that combinations of different attributes all pass
([Link](https://github.com/aws-observability/aws-otel-java-instrumentation/blob/main/awsagentprovider/src/test/java/software/amazon/opentelemetry/javaagent/providers/AwsMetricAttributeGeneratorTest.java#L573))
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.1 parent c6e03ab commit 47ce3b1
File tree
1 file changed
+1
-1
lines changed- awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
643 | | - | |
| 643 | + | |
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| |||
0 commit comments