Skip to content

bhautikpip/aws-opentelemetry-java-instrumentation

 
 

Repository files navigation

AWS OpenTelemetry Instrumentation for Java

Introduction

This project is a redistribution of the OpenTelemetry Agent for Java, preconfigured for use with AWS services. Please check out that project too to get a better understanding of the underlying internals. You won't see much code in this repository since we only apply some small configuration changes, and our OpenTelemetry friends takes care of the rest.

We provided a Java agent JAR that can be attached to any Java 7+ application and dynamically injects bytecode to capture telemetry from a number of popular libraries and frameworks. The telemetry data can be exported in a variety of formats. In addition, the agent and exporter can be configured via command line arguments or environment variables. The net result is the ability to gather telemetry data from a Java application without any code changes.

Getting Started

Check out the getting started docs.

Supported Java libraries and frameworks

For the complete list of supported frameworks, please refer to the upstream documentation here

How it works

The OpenTelemetry Java SDK provides knobs for configuring aspects using Java SPI. This configuration includes being able to reconfigure the IdsGenerator which we need to support X-Ray compatible trace IDs. Because the SDK uses SPI, it is sufficient for the custom implementation to be on the classpath to be recognized. The AWS distribution of the OpenTelemetry Java Agent repackages the upstream agent by simply adding our SPI implementation for reconfiguring the ID generator. In addition, it includes AWS resource providers by default, and it sets a system property to configure the agent to use multiple trace ID propagators, defaulting to maximum interoperability.

Other than that, the distribution is identical to the upstream agent and all configuration can be used as is.

About

(Prototype) AWS customization of OpenTelemetry Java Instrumentation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 51.5%
  • Kotlin 44.5%
  • Dockerfile 4.0%