Installation
Add the Metlo Spring Boot Reactive starter to your Mavenpom.xml:
For Gradle, add:
Quick Start
Add dependency
Add the Metlo Spring Boot Reactive starter dependency to your
pom.xml or build.gradle.Configure application.yml
Add Metlo configuration to your
application.yml or application.properties:Configuration
Configure Metlo using Spring Boot properties inapplication.yml or application.properties.
Required Properties
Enable or disable Metlo request and response tracing
Your Metlo API key for authentication
The Metlo API host URL to send traces to
Optional Properties
Maximum number of threads to use for asynchronous communication
Maximum number of trace requests per second to capture. Use
-1 for unlimited.Case-insensitive list of field names to omit from headers, bodies, and query arguments
Log trace requests to application logs for debugging
Manually set the instance hostname for tracing. Auto-detected if not specified.
Complete Configuration Example
Environment-Based Configuration
Use environment variables in production:How It Works
The Spring Boot starter automatically:- Registers a WebFilter - Intercepts all ServerWebExchange instances
- Captures request data - Headers, body, query parameters (respecting protected keys)
- Captures response data - Status, headers, body (respecting protected keys)
- Rate limiting - Applies configured RPS limit
- Asynchronous transmission - Sends traces using thread pool
Data Filtering
Theprotected-keys configuration automatically redacts sensitive fields from:
- Request headers
- Response headers
- Request body (JSON fields)
- Response body (JSON fields)
- Query parameters
Captured Data
Request:- URL (host, path, query parameters)
- HTTP method
- Headers (filtered)
- Request body (filtered)
- Source IP and port
- Status code
- Headers (filtered)
- Response body (filtered)
- Destination IP and port
- Environment
- Hostname (auto-detected or configured)
- Source identifier
- Timestamp
Full Reactive Application Example
pom.xml
UserHandler.java
RouterConfig.java
application.yml
Protected Keys
Configure which field names should be redacted from traces:- HTTP headers
- Query parameters
- JSON request/response bodies
Troubleshooting
Auto-configuration not working
Auto-configuration not working
Ensure:
- The starter dependency is in your
pom.xmlorbuild.gradle metlo.enabled=trueis set- Spring Boot auto-configuration is not disabled
- Check startup logs for Metlo initialization messages
Requests not being captured
Requests not being captured
Verify:
metlo.enabledistrue- API key and host are configured correctly
- Check if rate limiting is too restrictive
- Enable
metlo.log-requests=trueto see trace logs
Sensitive data not redacted
Sensitive data not redacted
Check that:
- Field names are in the
protected-keyslist - Keys are spelled correctly (case-insensitive matching)
- Data is in JSON format (filtering works on structured data)
Performance issues
Performance issues
Try:
- Reducing
thread-pool-size - Lowering
requests-per-secondlimit - Disabling
log-requestsin production - Using a local collector to reduce network latency
Requirements
- Java >= 8
- Spring Boot >= 2.0
- Spring WebFlux
Compatibility
Metlo’s Spring Reactive starter works with:- Spring Boot 2.x and 3.x
- Spring WebFlux (functional and annotated controllers)
- Reactive data access (R2DBC, MongoDB Reactive)
- Netty, Undertow, and Jetty reactive servers
Next Steps
API Discovery
View your discovered reactive APIs
Traditional Spring
See the non-reactive Spring integration