Skip to content

Commit

Permalink
Fix aws propagator presence check (#9924)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored Nov 22, 2023
1 parent 08e5b20 commit d4e6078
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static TextMapPropagator getCompositeTextMapPropagator(
}
break;
case "xray":
if (isOnClasspath("io.opentelemetry.contrib.awsxray.AwsXrayPropagator")) {
if (isOnClasspath("io.opentelemetry.contrib.awsxray.propagator.AwsXrayPropagator")) {
propagators.add(
beanFactory
.getBeanProvider(AwsXrayPropagator.class)
Expand All @@ -91,7 +91,7 @@ static TextMapPropagator getCompositeTextMapPropagator(
}

private static boolean isOnClasspath(String clazz) {
return ClassUtils.isPresent(clazz, null);
return ClassUtils.isPresent(clazz, CompositeTextMapPropagatorFactory.class.getClassLoader());
}

private CompositeTextMapPropagatorFactory() {}
Expand Down

0 comments on commit d4e6078

Please sign in to comment.