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

Fix JarAnalyzer warnings on Payara #10458

Merged
merged 5 commits into from
Feb 12, 2024

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Feb 9, 2024

On Payara JarAnalyzer produces a lot of warnings like

App - STDERR: [otel.javaagent 2024-02-09 17:24:41:595 +0000] [JarAnalyzer_WorkerThread-1] WARN io.opentelemetry.javaagent.shaded.instrumentation.javaagent.runtimemetrics.java8.JarAnalyzer - Error reading package for archive URL: file:/opt/payara/appserver/glassfish/modules/osgi-adapter.jar
App - STDERR: java.io.IOException: no entry name specified
App - STDERR: 	at java.base/sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:160)
App - STDERR: 	at java.base/java.net.URL.openStream(URL.java:1165)
App - STDERR: 	at io.opentelemetry.javaagent.shaded.instrumentation.javaagent.runtimemetrics.java8.JarDetails.getInputStream(JarDetails.java:194)
App - STDERR: 	at io.opentelemetry.javaagent.shaded.instrumentation.javaagent.runtimemetrics.java8.JarDetails.computeDigest(JarDetails.java:180)
App - STDERR: 	at io.opentelemetry.javaagent.shaded.instrumentation.javaagent.runtimemetrics.java8.JarDetails.<init>(JarDetails.java:67)
App - STDERR: 	at io.opentelemetry.javaagent.shaded.instrumentation.javaagent.runtimemetrics.java8.JarDetails.forUrl(JarDetails.java:86)
App - STDERR: 	at io.opentelemetry.javaagent.shaded.instrumentation.javaagent.runtimemetrics.java8.JarAnalyzer.processUrl(JarAnalyzer.java:191)
App - STDERR: 	at io.opentelemetry.javaagent.shaded.instrumentation.javaagent.runtimemetrics.java8.JarAnalyzer$Worker.run(JarAnalyzer.java:175)
App - STDERR: 	at java.base/java.lang.Thread.run(Thread.java:829)

This PR works around these warnings and changes the JarAnalyzer logging so that warnings will be visible only when debug logging is enabled.

@laurit laurit requested a review from a team February 9, 2024 17:29
@laurit laurit merged commit 7a044f5 into open-telemetry:main Feb 12, 2024
47 checks passed
@laurit laurit deleted the jar-analyzer-warning branch February 12, 2024 13:45
steverao pushed a commit to steverao/opentelemetry-java-instrumentation that referenced this pull request Feb 16, 2024
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.

3 participants