Git Product home page Git Product logo

marychatte / opentelemetry-java-instrumentation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from open-telemetry/opentelemetry-java-instrumentation

0.0 0.0 0.0 168.25 MB

OpenTelemetry auto-instrumentation and instrumentation libraries for Java

Home Page: https://opentelemetry.io

License: Apache License 2.0

Shell 0.01% JavaScript 0.12% Python 0.01% Java 85.47% Scala 0.75% Groovy 12.62% Kotlin 0.78% HTML 0.04% Batchfile 0.01% Lex 0.12% FreeMarker 0.01% Dockerfile 0.09% Mustache 0.01%

opentelemetry-java-instrumentation's Introduction


Getting Started   •   Getting Involved   •   Getting In Touch

Build Status GitHub release (latest by date including pre-releases) Beta

Contributing   •   Scope


OpenTelemetry Icon OpenTelemetry Instrumentation for Java

About

This project provides a Java agent JAR that can be attached to any Java 8+ application and dynamically injects bytecode to capture telemetry from a number of popular libraries and frameworks. You can export the telemetry data in a variety of formats. You can also configure the agent and exporter via command line arguments or environment variables. The net result is the ability to gather telemetry data from a Java application without code changes.

This repository also publishes standalone instrumentation for several libraries (and growing) that can be used if you prefer that over using the Java agent. Please see the standalone library instrumentation column on Supported Libraries. If you are looking for documentation on using those.

Getting Started

Download the latest version.

This package includes the instrumentation agent as well as instrumentations for all supported libraries and all available data exporters. The package provides a completely automatic, out-of-the-box experience.

Enable the instrumentation agent using the -javaagent flag to the JVM.

java -javaagent:path/to/opentelemetry-javaagent.jar \
     -jar myapp.jar

By default, the OpenTelemetry Java agent uses OTLP exporter configured to send data to OpenTelemetry collector at http://localhost:4317.

Configuration parameters are passed as Java system properties (-D flags) or as environment variables. See the configuration documentation for the full list of configuration items. For example:

java -javaagent:path/to/opentelemetry-javaagent.jar \
     -Dotel.resource.attributes=service.name=your-service-name \
     -Dotel.traces.exporter=zipkin \
     -jar myapp.jar

Configuring the Agent

The agent is highly configurable! Many aspects of the agent's behavior can be configured for your needs, such as exporter choice, exporter config (like where data is sent), trace context propagation headers, and much more.

Click here to see the detailed list of configuration environment variables and system properties.

Note: Config parameter names are very likely to change over time, so please check back here when trying out a new version! Please report any bugs or unexpected behavior you find.

Supported libraries, frameworks, and application servers

We support an impressively huge number of libraries and frameworks and a majority of the most popular application servers...right out of the box! Click here to see the full list and to learn more about disabled instrumentation and how to suppress unwanted instrumentation.

Creating agent extensions

Extensions add new features and capabilities to the agent without having to create a separate distribution or to fork this repository. For example, you can create custom samplers or span exporters, set new defaults, and embed it all in the agent to obtain a single jar file.

Manually instrumenting

For most users, the out-of-the-box instrumentation is completely sufficient and nothing more has to be done. Sometimes, however, users wish to add attributes to the otherwise automatic spans, or they might want to manually create spans for their own custom code.

For detailed instructions, see Manual instrumentation.

Logger MDC (Mapped Diagnostic Context) auto-instrumentation

It is possible to inject trace information like trace IDs and span IDs into your custom application logs. For details, see Logger MDC auto-instrumentation.

Troubleshooting

To turn on the agent's internal debug logging:

-Dotel.javaagent.debug=true

Note: These logs are extremely verbose. Enable debug logging only when needed. Debug logging negatively impacts the performance of your application.

Contributing

See CONTRIBUTING.md.

Triagers (@open-telemetry/java-instrumentation-triagers):

Approvers (@open-telemetry/java-instrumentation-approvers):

Maintainers (@open-telemetry/java-instrumentation-maintainers):

Emeritus maintainers:

Learn more about roles in the community repository.

Thanks to all the people who already contributed!

opentelemetry-java-instrumentation's People

Contributors

agoallikmaa avatar anuraaga avatar breedx-splk avatar dependabot[bot] avatar dougqh avatar gary-huang avatar gpolaert avatar halofour avatar heyams avatar inikem avatar jack-berg avatar jaydeluca avatar jeanbisutti avatar kuba-wu avatar labbati avatar laurit avatar lpriima avatar mabdinur avatar mar-kolya avatar opentelemetrybot avatar pavolloffay avatar prydin avatar randomanderson avatar realark avatar renovate[bot] avatar richardstartin avatar trask avatar tylerbenson avatar willgittoes-dd avatar zeitlinger avatar

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.