Skip to content

Commit 04436a1

Browse files
authored
Don't log stack trace for expected exceptions (#9279)
1 parent b8753fb commit 04436a1

File tree

2 files changed

+10
-6
lines changed
  • instrumentation/aws-sdk
    • aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11
    • aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2

2 files changed

+10
-6
lines changed

instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/PluginImplUtil.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ static boolean isImplPresent(String implSimpleClassName) {
4545
// dependency is not on the class path).
4646
logger.log(
4747
Level.FINE,
48-
e,
4948
() ->
50-
implFullClassName
51-
+ " not present. "
49+
"Failed to load "
50+
+ implFullClassName
51+
+ " ("
52+
+ e.getClass().getName()
53+
+ "). "
5254
+ "Most likely, corresponding SDK component is either not on classpath or incompatible.");
5355
return false;
5456
}

instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/PluginImplUtil.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ static boolean isImplPresent(String implSimpleClassName) {
4545
// dependency is not on the class path).
4646
logger.log(
4747
Level.FINE,
48-
e,
4948
() ->
50-
implFullClassName
51-
+ " not present. "
49+
"Failed to load "
50+
+ implFullClassName
51+
+ " ("
52+
+ e.getClass().getName()
53+
+ "). "
5254
+ "Most likely, corresponding SDK component is either not on classpath or incompatible.");
5355
return false;
5456
}

0 commit comments

Comments
 (0)