Giter Site home page Giter Site logo

Comments (17)

realark avatar realark commented on June 15, 2024

@tony-schellenberg I don't think failing to resolve net.bytebuddy.dynamic.Nexus would affect the JMS instrumentation. I think in this case that's not actually an error due to the class being dynamically generated.

I can take a look through your full debug log if you can send those.

from dd-trace-java.

tony-schellenberg avatar tony-schellenberg commented on June 15, 2024

I think I can do that. Do you just need all the DataDog lines?

from dd-trace-java.

realark avatar realark commented on June 15, 2024

Yes, that will do it. Thanks!

from dd-trace-java.

tony-schellenberg avatar tony-schellenberg commented on June 15, 2024

I'm just looking at the logs. Is there a secure way for me to transfer them to you? I don't think there's anything sensitive in them but it's probably better if I don't just post them. Should I open a ticket with support and provide them there and give you the ticket number here?

from dd-trace-java.

realark avatar realark commented on June 15, 2024

Yeah going through the support system and posting the ticket number is the best way to get those logs to me.

from dd-trace-java.

tony-schellenberg avatar tony-schellenberg commented on June 15, 2024

I have posted a log to ticket #171383

from dd-trace-java.

realark avatar realark commented on June 15, 2024

I took a look through the logs. I think the missing Nexus class is a red herring. I don't see the JMS Instrumentation attempting to apply. Which JMS client (and version) are you running with?

from dd-trace-java.

tony-schellenberg avatar tony-schellenberg commented on June 15, 2024

The JMS implementation is com.sun.messaging.mq:imq:3.5. The jms version is 1.1.

I know this is an old client. In our code, we are using the javax type such as javax.jms.MessageProducer with this library.

from dd-trace-java.

tylerbenson avatar tylerbenson commented on June 15, 2024

@tony-schellenberg Is that even available in maven central? I only see version 4.2+ there.
We'd be happy to run it through some tests to verify compatibility, but that becomes a challenge if it's not in maven central.

from dd-trace-java.

tony-schellenberg avatar tony-schellenberg commented on June 15, 2024

I don't know if it's there or not. We had the product since before it was OpenMQ back when it was paid. We have our own Maven server that mirrors maven central but also has other artifacts so this one might not be generally available.

Given that it supports the javax.jms interfaces, can you think of a reason that it wouldn't instrument? Is there something that I can look for in it or a way that I can run the tests?

from dd-trace-java.

tylerbenson avatar tylerbenson commented on June 15, 2024

@tony-schellenberg When running with debug logging enabled, I'd expect to see these kinds of messages:

[Test worker] DEBUG datadog.trace.agent.tooling.Instrumenter$Default - Applying instrumentation: okhttp -- datadog.trace.instrumentation.okhttp3.OkHttp3Instrumentation on sun.misc.Launcher$AppClassLoader@15db9742
[Test worker] DEBUG datadog.trace.agent.tooling.AgentInstaller$LoggingListener - Transformed class okhttp3.OkHttpClient -- sun.misc.Launcher$AppClassLoader@15db9742
[Test worker] DEBUG datadog.trace.bootstrap.ExceptionLogger - Failed to handle exception in instrumentation

Another message you should search for in the logs is Instrumentation muzzled, which might give indication as to why the library might be skipped.

from dd-trace-java.

tony-schellenberg avatar tony-schellenberg commented on June 15, 2024

I can't see anything in the logs referring to instrumentation being muzzled.

Looking at this https://github.com/DataDog/dd-trace-java/blob/master/dd-java-agent/instrumentation/jms/src/main/java/datadog/trace/instrumentation/jms/JMSMessageProducerInstrumentation.java#L41

I unpacked the imq library and did a bit of digging. There is a concrete implementation that implements javax.jms.MessageProducer. I'm don't have much understanding of how the auto instrumentation works. Is there some other obvious reason why it wouldn't be able to find it that I can dig into?

from dd-trace-java.

realark avatar realark commented on June 15, 2024

Generally the way our instrumentation works:

  1. A matcher sees a class it could potentially instrument (like in your jms-producer link)
  2. The classpath is checked to ensure it's safe to apply instrumentation.
  3. Instrumentation applies or logs a failure to apply.

Any of these stages would have produced something in the log file.

I think the issue is we're skipping instrumentation because the class name starts with com.sun. We skip "core" namespaces for performance reasons.

https://github.com/datadog/dd-trace-java/blob/master/dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/AgentInstaller.java#L70

Can you confirm the package-namespace of the client you're trying to instrument?

from dd-trace-java.

tony-schellenberg avatar tony-schellenberg commented on June 15, 2024

I think you might have figured it out. The one class I'm looking at so far is com.sun.messaging.jmq.jmsclient.MessageProducerImpl

from dd-trace-java.

realark avatar realark commented on June 15, 2024

Great, that explains it. We should be good to whitelist com.sun.messaging.. Do you think that will cover your client's namespace?

from dd-trace-java.

tony-schellenberg avatar tony-schellenberg commented on June 15, 2024

From what I can see of it, I think that should be good. Thanks for helping me out with this.

from dd-trace-java.

tylerbenson avatar tylerbenson commented on June 15, 2024

Fix is included in 0.17.0.

from dd-trace-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.