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

pulsar instrumentation not loaded by java agent #8372

Closed
stevesea opened this issue Apr 26, 2023 · 3 comments · Fixed by #8378
Closed

pulsar instrumentation not loaded by java agent #8372

stevesea opened this issue Apr 26, 2023 · 3 comments · Fixed by #8378
Labels
bug Something isn't working

Comments

@stevesea
Copy link

stevesea commented Apr 26, 2023

Describe the bug
It doesn't appear that Pulsar autoinstrumentation is working. When I enable javaagent debug logging, I don't see debug messages from the InstrumentationLoader indicating that it's loading the Pulsar 2.8 instrumentation.

Steps to reproduce
set OTEL_JAVAAGENT_DEBUG=true, observe the output does not include Pulsar

What did you expect to see?
The Pulsar instrumentation loaded, and Messaging Spans created for pulsar consumer

What did you see instead?
similar to jdbc and other instrumentations, I expected to see debug log messages reporting the pulsar instrumentation was loaded.

[otel.javaagent 2023-04-26 20:13:30:334 +0000] [main] DEBUG io.opentelemetry.javaagent.tooling.instrumentation.InstrumentationLoader - Loading instrumentation java-util-logging [class io.opentelemetry.javaagent.instrumentation.jul.JavaUtilLoggingInstrumentationModule]
[otel.javaagent 2023-04-26 20:13:30:335 +0000] [main] DEBUG io.opentelemetry.javaagent.tooling.instrumentation.InstrumentationLoader - Loading instrumentation jdbc [class io.opentelemetry.javaagent.instrumentation.jdbc.JdbcInstrumentationModule]
[otel.javaagent 2023-04-26 20:13:30:344 +0000] [main] DEBUG io.opentelemetry.javaagent.tooling.instrumentation.InstrumentationLoader - Loading instrumentation jdbc-datasource [class io.opentelemetry.javaagent.instrumentation.jdbc.datasource.DataSourceInstrumentationModule]
[otel.javaagent 2023-04-26 20:13:30:344 +0000] [main] DEBUG io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule - Instrumentation jdbc-datasource is disabled

setting the following env vars did not result in Pulsar instrumentation being loaded, or add messaging spans from my pulsar consumer.

OTEL_INSTRUMENTATION_PULSAR_ENABLED=true
OTEL_INSTRUMENTATION_PULSAR_EXPERIMENTAL_SPAN_ATTRIBUTES=true
OTEL_INSTRUMENTATION_MESSAGING_EXPERIMENTAL_RECEIVE_TELEMETRY_ENABLED=true

I do see some otel+pulsar logs from the javaagent -- messages like this from AgentInstaller$TransformLoggingListener:

[otel.javaagent 2023-04-26 20:13:37:414 +0000] [main] DEBUG io.opentelemetry.javaagent.tooling.AgentInstaller$TransformLoggingListener - Transformed org.apache.pulsar.client.impl.ConnectionPool$$Lambda$755 -- jdk.internal.loader.ClassLoaders$AppClassLoader@39e67516
[otel.javaagent 2023-04-26 20:13:37:535 +0000] [pulsar-client-io-1-1] DEBUG io.opentelemetry.javaagent.tooling.AgentInstaller$TransformLoggingListener - Transformed org.apache.pulsar.common.protocol.ByteBufPair$Encoder -- jdk.internal.loader.ClassLoaders$AppClassLoader@39e67516
[otel.javaagent 2023-04-26 20:13:37:536 +0000] [pulsar-client-io-1-1] DEBUG io.opentelemetry.javaagent.tooling.AgentInstaller$TransformLoggingListener - Transformed org.apache.pulsar.common.protocol.ByteBufPair$CopyingEncoder -- jdk.internal.loader.ClassLoaders$AppClassLoader@39e67516
[otel.javaagent 2023-04-26 20:13:37:550 +0000] [pulsar-client-io-1-1] DEBUG io.opentelemetry.javaagent.instrumentation.executors.FutureInstrumentation - Skipping future instrumentation for org.apache.pulsar.client.util.TimedCompletableFuture
[otel.javaagent 2023-04-26 20:13:37:551 +0000] [pulsar-client-io-1-1] DEBUG io.opentelemetry.javaagent.tooling.AgentInstaller$TransformLoggingListener - Transformed org.apache.pulsar.client.util.TimedCompletableFuture -- jdk.internal.loader.ClassLoaders$AppClassLoader@39e67516

What version are you using?
v1.25.0

Environment
Compiler: Eclipse Adoptium OpenJDK 64-Bit Server VM 17.0.6+10
OS: eclipse-temurin:17.0.6_10-jre-jammy

Additional context
Added the v1.25.0 otel javaagent to backend service which has a Pulsar consumer.
Backend service is http4k, using Pulsar 2.11.1 client library. I was hoping to have new spans created via the Pulsar instrumentation.

set the following env vars

OTEL_INSTRUMENTATION_PULSAR_EXPERIMENTAL_SPAN_ATTRIBUTES=true
OTEL_INSTRUMENTATION_MESSAGING_EXPERIMENTAL_RECEIVE_TELEMETRY_ENABLED=true

The spans of the app just include jdbc, or the http library (undertow). and no spans from the Pulsar instrumentation.

@stevesea stevesea added the bug Something isn't working label Apr 26, 2023
@laurit
Copy link
Contributor

laurit commented Apr 27, 2023

It seems like by renaming the pulsar module in #8195 we accidentally didn't rename the subdirectory which results in the pulsar instrumentation being missing from javaagent.

@stevesea
Copy link
Author

changed application to use the 1.24.0 javaagent, and confirmed that Pulsar Messaging Spans were exported.
Thank you!

@trask
Copy link
Member

trask commented Apr 28, 2023

@stevesea thanks for reporting this! we have released 1.25.1 to fix this regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants