Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Muzzle should add SPI classes defined in helperResourceNames as references #1918

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

mateuszrzeszutek
Copy link
Member

Resolves #1887

"io.opentelemetry.instrumentation.awssdk.v2_2.TracingExecutionInterceptor",
"io.opentelemetry.extension.trace.propagation.AwsXRayPropagator"
};
return new String[] {"io.opentelemetry.extension.trace.propagation.AwsXRayPropagator"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the change!!! Just checking, will muzzle task fail if this class isn't included now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it will:

FAILED MUZZLE VALIDATION: io.opentelemetry.javaagent.instrumentation.awssdk.v2_2.AwsSdkInstrumentationModule mismatches:
-- io.opentelemetry.instrumentation.awssdk.v2_2.AwsSdkHttpClientTracer:39 Missing class io.opentelemetry.extension.trace.propagation.AwsXRayPropagator

}

List<String> spiImplementations = new ArrayList<>();
try (InputStream stream = getResourceStream(resource)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use Files.lines or Files.readAllLines?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to use one of those but they all accept Path - and we pretty much have to use InputStream here because of connection.setUseCaches(false)

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is great! will really encourage us to instrument via official SPI hooks more 👍

@trask trask merged commit cd58ac8 into open-telemetry:master Dec 17, 2020
bhautikpip pushed a commit to bhautikpip/opentelemetry-java-instrumentation that referenced this pull request Dec 18, 2020
@mateuszrzeszutek mateuszrzeszutek deleted the muzzle-spi branch February 5, 2021 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Muzzle should add SPI classes defined in helperResourceNames as references
3 participants