Skip to content

hypertrace/javaagent

Repository files navigation

CircleCI

Hypertrace OpenTelemetry Java agent

Hypertrace distribution of OpenTelemetry Java agent.

This agent supports these frameworks and adds following capabilities:

  • capture request and response headers
  • capture request and response bodies
  • execution blocking based on Open Policy Agent

List of supported frameworks with additional capabilities:

Library/Framework Versions
Servlet 2.3+
Spark Web Framework 2.3+

Build

make build

The final artifact is in javaagent/build/libs/hypertrace-agent-<version>-all.jar

Run

OTEL_EXPORTER=zipkin java -javaagent:javaagent/build/libs/hypertrace-agent-0.0.1-all.jar -jar app.jar

The configuration precedence order

  1. OpenTelemetry Agent's trace config file OTEL_TRACE_CONFIG/otel.trace.config
  2. OpenTelemetry system properties and env variables

Hypertrace body/headers capture can be disabled by:

  • HYPERTRACE_INTEGRATION_ALL_ENABLED - disables capture for all instrumentations
  • HYPERTRACE_INTEGRATION_<integration>_ENABLED - disables capture for a specified instrumentation e.g. servlet, servlet-1

Disable request/response body capture

Request and response body capture can be disabled by -Dotel.integration.body.enabled=false or -Dotel.integration.<instrumentation>-body.enabled=false.

Test

Tests use docker via Testcontainers.org.

When running tests from IDE set SMOKETEST_JAVAAGENT_PATH env variable.

make test

About

Hypertrace OpenTelemetry Java agent with payload/body and headers data capture.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages