OpenTelemetry auto-instrumentation and instrumentation libraries for Java
Go to file
Trask Stalnaker efed5ae682
Standardize instrumentation module names (#145)
* Rename vertx module

* Rename glassfish module

* Rename google-http-client module

* Rename jms module

* Rename twilio module

* Move dropwizard-testing to top-level

Since it's not related to dropwizard-views.

* Rename dropwizard-views modules

* Rename aws-java-sdk-1.11.0 module

* Rename apache-httpasyncclient-4 module

* Rename apache-httpclient-4 module

* Rename datastax-cassandra-3 module

* Rename elasticsearch:rest-5 module

* Rename elasticsearch:transport-2 module

* Rename elasticsearch:transport-5 module

* Rename elasticsearch:transport-6 module

* Rename grizzly-2 module

* Rename jax-rs-annotations-1 module

* Rename jax-rs-annotations-2 module

* Rename filter-jersey module

* Rename jetty module

* Rename lettuce-5 module

* Rename okhttp-3 module

* Rename play-ws-1 module

* Rename play-ws-2 module

* Rename rxjava-1 module

* Rename request-2 module

* Rename request-3 module

* Rename spring-webflux-5 module
2020-02-07 16:34:36 -08:00
.circleci Rename java agent artifact (#137) 2020-02-06 16:03:24 -08:00
agent-bootstrap Set span kind and remove prior "span.kind" attribute (#132) 2020-02-05 15:12:33 -08:00
agent-tooling Fix version logger error (#141) 2020-02-07 09:41:37 -08:00
benchmark Rename java agent artifact (#137) 2020-02-06 16:03:24 -08:00
benchmark-integration Remove trace-api artifact (#116) 2020-02-01 13:07:51 -08:00
buildSrc Merge tag 'v0.42.0' 2020-02-01 13:28:58 -08:00
gradle Fixed error handling when Java version can't be determined (#118) 2020-02-03 12:38:21 -08:00
instrumentation Standardize instrumentation module names (#145) 2020-02-07 16:34:36 -08:00
java-agent Rename java agent artifact (#137) 2020-02-06 16:03:24 -08:00
load-generator Rename java agent artifact (#137) 2020-02-06 16:03:24 -08:00
opentelemetry-sdk-shaded-for-testing Move OpenTelemetry SDK out of the bootstrap loader (#86) 2020-01-27 11:11:05 -08:00
smoke-tests Rename java agent artifact (#137) 2020-02-06 16:03:24 -08:00
testing Set span kind and remove prior "span.kind" attribute (#132) 2020-02-05 15:12:33 -08:00
tooling Copy over dd_jvm_stats.sh from #939 2019-08-20 12:27:36 -07:00
utils Remove trace-api artifact (#116) 2020-02-01 13:07:51 -08:00
.editorconfig Apply and enforce google checkstyle and formatting 2017-07-12 07:47:19 -07:00
.gitignore Rename package to io.opentelemetry.auto (#54) 2020-01-14 13:57:01 -08:00
CODEOWNERS Update Seva's github username (#35) 2019-12-04 13:04:17 -08:00
CONTRIBUTING.md Rename package to io.opentelemetry.auto (#54) 2020-01-14 13:57:01 -08:00
LICENSE Update to standard LICENSE file for OpenTelemetry (#19) 2019-11-19 09:46:10 -08:00
LICENSE-3rdparty.csv Rename package to io.opentelemetry.auto (#54) 2020-01-14 13:57:01 -08:00
NOTICE Create NOTICE 2017-07-13 10:16:04 -04:00
README.md Update README (#138) 2020-02-06 16:16:33 -08:00
gradle.properties Try doubling the metaspace size to fix check task. 2019-01-04 13:43:40 -08:00
gradlew Upgradle to gradle 6.0 2019-11-12 16:26:46 -05:00
gradlew.bat Update gradle to 5.5.1 2019-07-12 10:07:08 -04:00
settings.gradle Standardize instrumentation module names (#145) 2020-02-07 16:34:36 -08:00
trace-java.gradle Update version to 0.1.2-SNAPSHOT (#144) 2020-02-07 16:05:04 -08:00

README.md

OpenTelemetry Auto-Instrumentation for Java

Notice - Work in Progress!

This project is still in the early phases of development and is not yet stable. You are welcome to experiment with it, but we strongly discourage any production use!

Introduction

This project uses a technique known as bytecode instrumentation to add tracing to a Java application. Simply put, we provide a Java agent that can be attached to any Java 7+ application and dynamically adds code to enable tracing.

Using the agent

As mentioned above, this project is in a very early phase of development and not yet stable. However, you can try it on your Java application by following these instructions.

Download and run

Download the latest release.

The instrumentation agent is enabled using the -javaagent flag to the JVM. Configuration parameters are passed as Java system properties (-D flags) or as environment variables. This is an example:

java -javaagent:/path/to/opentelemetry-auto-<version>.jar \
     -Dota.exporter=jaeger \
     -Dota.jaeger.host=localhost \
     -Dota.jaeger.port=14250 \
     -Dota.jaeger.service=shopping \
     -jar myapp.jar

Configuration parameters (subject to change!)

System property Environment variable Purpose
ota.exporter OTA_EXPORTER The name of the exporter. Currently only supports 'jaeger' for Jager over gRPC
ota.service OTA_SERVICE The service name of this JVM instance. This is used as a label in Jaeger to distinguish between JVM instances in a multi-service environment.
ota.jaeger.host OTA_JAEGER_HOST The Jaeger host to connect to. Currently only gRPC is supported.
ota.jaeger.port OTA_JAEGER_PORT The port to connect to on the Jaeger host. Currently only gRPC is supported

These 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 may find.

Building from source

Build using Java 8:

gradle assemble

and then you can find the java agent artifact at java-agent/build/lib/opentelemetry-auto-<version>.jar.