Requests
- Spring
- Servlets
- Request headers, with the extension
- Request and response bodies (WizeLensBodyFilter)
The OpenTelemetry Java agent traces Spring, servlets, JDBC, Hibernate, HTTP clients, and Kafka with no code change, and it sends to WizeLens today. The WizeLens extension adds SQL parameters and sampling that keeps errors. It is coming to Maven Central.
# opentelemetry-javaagent.jar, from the OpenTelemetry releases export OTEL_SERVICE_NAME=orders-api export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:5960 java -javaagent:opentelemetry-javaagent.jar \ -jar app.jar
Everything below lands in the same trace as the request that caused it.
The OpenTelemetry Java agent traces the app as it runs. Point it at WizeLens and you get traces, logs, and the insights.
-javaagent:opentelemetry-javaagent.jarThe agent replaces SQL values with ?, so WizeLens cannot call two queries duplicates. The extension turns parameters on. Until it is on Maven Central, build it with mvn -f java/pom.xml package.
-Dotel.javaagent.extensions=wizelens.jarWith the extension, sample with WIZELENS_SAMPLE_RATE and WizeLens still keeps every trace with an error or a span of 1 second or more.
Anything you set with -D or OTEL_* wins over the extension. Each WIZELENS_* variable also works as a system property.
-Dwizelens.sample.rate=0.1A Vue front end, a .NET gateway, a Node service, and a Python worker join the same trace, and the same insights run on all of it.