dd-trace-java | Datadog APM client for Java | Monitoring library

 by   DataDog Java Version: v1.15.3 License: Apache-2.0

kandi X-RAY | dd-trace-java Summary

kandi X-RAY | dd-trace-java Summary

dd-trace-java is a Java library typically used in Performance Management, Monitoring applications. dd-trace-java has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub.

Datadog APM client for Java
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              dd-trace-java has a medium active ecosystem.
              It has 454 star(s) with 241 fork(s). There are 527 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 183 open issues and 347 have been closed. On average issues are closed in 85 days. There are 110 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of dd-trace-java is v1.15.3

            kandi-Quality Quality

              dd-trace-java has 0 bugs and 0 code smells.

            kandi-Security Security

              dd-trace-java has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              dd-trace-java code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              dd-trace-java is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              dd-trace-java releases are available to install and integrate.
              Build file is available. You can build the component from source.
              It has 110483 lines of code, 10437 functions and 1735 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed dd-trace-java and discovered the below as its top functions. This is intended to give you an instant insight into dd-trace-java implemented functionality, and help decide if they suit your requirements.
            • Returns the JdkTypeIDs for the given type ID .
            • Write long .
            • Checks to see if this matches the target type .
            • Parse the header value .
            • Matches a string against a pattern .
            • Creates an instance of GraphStageLogic .
            • Enrich an attack .
            • Asserts instrumentation with instrumentation .
            • Returns the Transformer .
            • Installs the agent .
            Get all kandi verified functions for this library.

            dd-trace-java Key Features

            No Key Features are available at this moment for dd-trace-java.

            dd-trace-java Examples and Code Snippets

            No Code Snippets are available at this moment for dd-trace-java.

            Community Discussions

            QUESTION

            Classpath problems while Instrumenting Springboot application
            Asked 2020-Feb-17 at 21:43

            I have a springboot application which I'm trying to instrument using bytebuddy. I'm running into classpath issues which I'm not able to understand.

            Firstly, the following is other literature on this:

            https://github.com/raphw/byte-buddy/issues/473

            https://github.com/raphw/byte-buddy/issues/87

            Unable to instrument apache httpclient using javaagent for spring boot uber jar application

            https://github.com/raphw/byte-buddy/issues/109

            https://github.com/raphw/byte-buddy/issues/473

            https://github.com/raphw/byte-buddy/issues/489

            https://github.com/spring-projects/spring-boot/issues/4868

            https://github.com/alibaba/transmittable-thread-local/issues/161

            Problem is that Spring-boot bundles the application into one uber-jar, which contains other jars inside it

            A thing to note here is, that if I run the application using IntelliJ, it doesn't use the uber-jar and runs via main class with a bunch of jars as classpath arguments.

            Due to this difference, When running via uber-jar(java -jar target/demo-0.0.1-SNAPSHOT.jar), some classes are not available at the time the Agent runs. The classes are loadable at the time of application main, as spring-boot uses its own classloader, which is created at some time b/w agent and application main methods.

            I'll describe the behaviour at various points of time below:

            At time of PreMain of Agent
            • Thread.currentThread().getContextClassLoader() = Launcher$AppClassLoader
            • Agent.class.classLoader = Launcher$AppClassLoader
            • Class.forName("org.springframework.web.servlet.HandlerAdapter") => ClassNotFoundException
            • Class.forName("javax.servlet.http.HttpServletRequest") => ClassNotFoundException

            Both spring and javax classes are not loaded as they are not directly in the classpath as per the App Classloader. It's part of an inner jar, something like app.jar!/BOOT-INF/lib/some.jar App Classloader won't be able to load this.

            At time of Main of Application Class
            • Thread.currentThread().getContextClassLoader() = org.springframework.boot.loader.LaunchedURLClassLoader
            • DemoApplication.class.classloader = same as above
            • Class.forName("org.springframework.web.servlet.HandlerAdapter") => loads successfully
            • Same for javax class, loads successfully.

            After loading, Class.forName("javax.servlet.http.HttpServletRequest").classLoader is also the same LaunchedURLClassLoader.

            At the time of builder.visit call (when bytebuddy is modifying the class definitions) Code:

            I have two classes, SpringBootInterceptor (which contains the intercept method) and SpringBootInterceptorOne (which contains the entry and exit method)

            ...

            ANSWER

            Answered 2020-Feb-17 at 21:43

            The problem is that the advice class will be loaded on the system class loader as a part of the agent whereas the actual application code is loaded on a sub-class loader that is not visible to the system class loader. This situation does not change if you load your agent on the boot loader either. Therefore, the agent cannot load the HttpServletRequest class which is part of the uber-jar.

            This is a typical problem with agents and Byte Buddy has a standard way to circumvent it by using a Transformer.ForAdvice instance instead of using the Advice class directly. Byte Buddy then creates a virtual class loader hierarchy that considers classes represented by both class loaders.

            Update: The problem is that you are calling down to your interceptor that is defined in the system class loader where the class in question is not available. The annotated code will be inlined but the invoked method will not. If you copy-pasted the code into the annotated method, the behavior is as you'd expect it. Byte Buddy uses the annotated code as template and reuses a lot of information emitted by javac to guarantee a speedy conversion. Therefore, the library cannot simply copy the method and should rather feed the entire method body to javac.

            Source https://stackoverflow.com/questions/60237664

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install dd-trace-java

            You can download it from GitHub.
            You can use dd-trace-java like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the dd-trace-java component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/DataDog/dd-trace-java.git

          • CLI

            gh repo clone DataDog/dd-trace-java

          • sshUrl

            git@github.com:DataDog/dd-trace-java.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Monitoring Libraries

            netdata

            by netdata

            sentry

            by getsentry

            skywalking

            by apache

            osquery

            by osquery

            cat

            by dianping

            Try Top Libraries by DataDog

            go-profiler-notes

            by DataDogJupyter Notebook

            glommio

            by DataDogRust

            datadog-agent

            by DataDogGo

            stratus-red-team

            by DataDogGo

            dd-agent

            by DataDogPython