Skip to content

Commit b39141c

Browse files
committed
Add extra unit test for AwsMetricAttributeGenerator
1 parent c8b5e0e commit b39141c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

awsagentprovider/src/test/java/software/amazon/opentelemetry/javaagent/providers/AwsMetricAttributeGeneratorTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,12 @@ public void testGetDBStatementRemoteOperation() {
632632
mockAttribute(DB_STATEMENT, "SELECT FROM *");
633633
mockAttribute(DB_OPERATION, "DB operation");
634634
validateExpectedRemoteAttributes("DB system", "DB operation");
635+
636+
// Case 10: Same as case 1 but with leading whitespace
637+
mockAttribute(DB_SYSTEM, "DB system");
638+
mockAttribute(DB_STATEMENT, " SELECT DB statement");
639+
mockAttribute(DB_OPERATION, null);
640+
validateExpectedRemoteAttributes("DB system", "SELECT");
635641
}
636642

637643
@Test

0 commit comments

Comments
 (0)