-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
bugSomething isn't workingSomething isn't workingneeds reproneeds triageNew issue that requires triageNew issue that requires triage
Description
Describe the bug
After upgrading to Dropwizard 5, HTTP server metrics are not being collected or exposed correctly. The application starts without errors, but expected HTTP-related metrics (e.g., request counts, latency timers, request body size) are missing or incomplete.
Expected Behavior
Dropwizard’s built-in instrumentation should automatically register:
- request duration timers
- request/response size meters
- per-endpoint and per-status-code metrics (e.g., io.dropwizard.jetty.MutableServletContextHandler.requests.)
Metrics should appear under the configured metrics backend (Prometheus, console, JMX, etc.).
Actual Behavior
- No HTTP server metrics are reported.
- Request/response metrics are missing.
Steps to reproduce
- Create a minimal Dropwizard 5 application:
- One simple resource, e.g. GET /ping returning "pong".
- Configure the server in config.yml with virtual threads disabled:
server:
type: default
enableVirtualThreads: false
- Start the application with the OpenTelemetry Java agent, for example:
java \
-javaagent:/path/to/opentelemetry-javaagent.jar \
-Dotel.service.name=dropwizard-test \
-Dotel.exporter.otlp.endpoint=http://localhost:4317 \
-jar target/app.jar server config.yml
- Send some traffic to the app:
curl http://localhost:8080/ping
# repeat many times or run a small load test
- Check the metrics/exported data in your backend (Prometheus / OTLP collector / logs):
- You will see traces and some metrics, but expected HTTP server metrics are missing or not updated.
- Now change the configuration to:
server:
type: default
enableVirtualThreads: true
- Restart the app with the same OTEL agent configuration, send the same traffic, and check metrics again:
- HTTP metrics appear to be collected correctly or at least more reliably than with enableVirtualThreads = false.
Expected behavior
Collect all metrics correctly
Actual behavior
The vast majority of the metrics are not collected.
Javaagent or library instrumentation version
2.21.0
Environment
JDK: 21.0.8 Correto
OS: amazon linux
DW 5.0.0
Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds reproneeds triageNew issue that requires triageNew issue that requires triage