Docs
Install
Java

Java Integration

HyperDX uses the OpenTelemetry standard for collecting telemetry data (logs and traces). Traces are auto-generated with automatic instrumentation, so manual instrumentation isn't required to get value out of tracing.

This Guide Integrates:

✅ Logs✅ Metrics✅ Traces

Getting Started

WARNING: At present, the integration is compatible exclusively with Java 8+

Download OpenTelemetry Java Agent

Download opentelemetry-javaagent.jar (opens in a new tab) and place the JAR in your preferred directory. The JAR file contains the agent and instrumentation libraries. You can also use the following command to download the agent:

curl -L -O https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar

Configure Environment Variables

Afterwards you'll need to configure the following environment variables in your shell to ship telemetry to HyperDX:

export JAVA_TOOL_OPTIONS="-javaagent:PATH/TO/opentelemetry-javaagent.jar" \
OTEL_EXPORTER_OTLP_ENDPOINT=https://in-otel.hyperdx.io \
OTEL_EXPORTER_OTLP_HEADERS='authorization=<YOUR_HYPERDX_API_KEY_HERE>' \
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf \
OTEL_LOGS_EXPORTER=otlp \
OTEL_SERVICE_NAME='<NAME_OF_YOUR_APP_OR_SERVICE>'

The OTEL_SERVICE_NAME environment variable is used to identify your service in the HyperDX app, it can be any name you want.

The OTEL_EXPORTER_OTLP_HEADERS environment variable is used to link your telemetry to your HyperDX account, and the API Key can be grabbed from the team page (opens in a new tab)

Run the Application with OpenTelemetry Java Agent

java -jar target/<APPLICATION_JAR_FILE>

Read more about Java OpenTelemetry instrumentation here: https://opentelemetry.io/docs/instrumentation/java/ (opens in a new tab)

Hi, how can I help you?