Alpha

The Java agent, pointed at WizeLens.

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.

0 code
the agent does the tracing
3 loggers
Logback, Log4j, java.util.logging
Soon
the extension on Maven Central
run.sh
# 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
GET /orders · 118 ms
GET /orders118 ms
SELECT o.id, o.total FROM orders o WHERE o.customer_id = ?2.8 ms
SELECT i.sku, i.qty FROM order_items i WHERE i.order_id = ?1.2 ms
GET pricing-api/prices52 ms
publish order.created3.1 ms
info Loaded 6 orders for customer 42

What gets captured.

Everything below lands in the same trace as the request that caused it.

Requests

  • Spring
  • Servlets
  • Request headers, with the extension
  • Request and response bodies (WizeLensBodyFilter)

Databases

  • JDBC
  • Hibernate
  • SQL parameters, with the extension

Calls and messages

  • HTTP clients
  • Kafka
  • And more, through the agent

Logs

  • Logback
  • Log4j
  • java.util.logging
  • MDC and code attributes, with the extension

Insights

  • N+1 queries
  • N+1 HTTP calls
  • Slow queries
  • Database waits
  • Duplicate queries, with the extension

Packages

  • Every Maven jar on the class path, with the extension
  • Inside Spring Boot and WAR jars too
  • Checked against OSV on the hub and cloud

The agent you know, with WizeLens defaults.

No code change.

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.jar

One jar brings the values back.

The 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.jar

Errors and slow traces stay.

With the extension, sample with WIZELENS_SAMPLE_RATE and WizeLens still keeps every trace with an error or a span of 1 second or more.

Your settings win.

Anything you set with -D or OTEL_* wins over the extension. Each WIZELENS_* variable also works as a system property.

-Dwizelens.sample.rate=0.1

Mixing stacks? One trace across all of them.

A 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.