This guide shows how to route both New Relic metric paths from a Java app through Sawmills. For collector endpoint exposure, first complete How to send data to the Sawmills collector.Documentation Index
Fetch the complete documentation index at: https://docs.sawmills.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A running Sawmills Collector with a New Relic source configured
- A New Relic license key
- A Java app instrumented with the New Relic Java agent and/or Telemetry SDK
Environment Variables
Set both variables to route all telemetry through Sawmills. If you only set one, part of your data bypasses Sawmills.| Variable | Controls | Format | Example |
|---|---|---|---|
NEW_RELIC_HOST | Java agent (timeslice metrics) | host:port | <collector-id>.collectors.sawmills.ai:10000 |
NEW_RELIC_METRICS_HOST | Telemetry SDK (dimensional metrics) | https://host:port | https://<collector-id>.collectors.sawmills.ai:10000 |
<collector-id> is shown in the Sawmills UI under your pipeline’s collector details.
Configure the Java app
Verify
- Check application logs for connection to your Sawmills collector endpoint.
- Validate metrics in New Relic:
Troubleshooting
| Symptom | Fix |
|---|---|
| Only some metrics go through Sawmills | Set both NEW_RELIC_HOST and NEW_RELIC_METRICS_HOST |
| Dimensional metrics fail | Use a base URL only for NEW_RELIC_METRICS_HOST — don’t append /metric/v1 |
| No data arrives | Verify DNS reachability to <collector-id>.collectors.sawmills.ai from the app |
| Changes not taking effect | Restart the deployment after updating env vars |