Skip to main content
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.

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. Your <collector-id> is shown in the Sawmills UI under your pipeline’s collector details.
Setting only one of these variables causes partial routing — some telemetry will go directly to New Relic instead of through Sawmills.

Configure the Java app

For Kubernetes, inject both values from a ConfigMap:
Restart the deployment after changes:

Verify

  1. Check application logs for connection to your Sawmills collector endpoint.
  2. Validate metrics in New Relic:

Troubleshooting