• /
  • EnglishEspañolFrançais日本語한국어Português
  • EntrarComeçar agora

Java agent distributed tracing settings

|View as Markdown (English)

Distributed tracing settings control how the agent propagates trace context across services, configures span event collection, and enables Infinite Tracing.

Dica

Back to the full settings index: Java agent configuration

Distributed tracing

Importante

Enabling distributed tracing disables cross application tracing, and has other effects on APM features. Before enabling, read the transition guide.

Requires Java agent version 4.3.0 or higher.

Distributed tracing lets you see the path that a request takes as it travels through a distributed system. It is on by default for Java agent version 7.4.0 or higher.

In the config file, you can override this manually in the distributed_tracing section. You can also override this using a prefixed system property (newrelic.config.distributed_tracing) or an environment variable (NEW_RELIC_DISTRIBUTED_TRACING_ENABLED). See the examples below.

For more information about setting up distributed tracing, see Enable distributed tracing for your Java applications.

For a deep dive into how these samplers work, adaptive sampling targets, and sampling contexts, see Configure sampling. For real-world configuration scenarios, see Sampler configuration examples.

Infinite Tracing

Importante

Requirements:

To turn on Infinite Tracing, enable distributed tracing and add the additional setting below. For an example, see Language agents: Configure distributed tracing.

Span events

Span events are reported for distributed tracing. You must enable distributed tracing to report span events.

Set span events configuration in the span_events section. These settings can be overridden with a newrelic.config.span_events prefixed system property. Options include:

Importante

Span event attribute filtering requires Java agent version 4.10.0 or higher.

Cross application tracer

Importante

Cross application tracing has been deprecated as of agent version 7.4.0 and will be removed in a future agent version.

Instead of using cross application tracing, we recommend our distributed tracing features. Distributed tracing is an improvement on the cross application tracing feature and is recommended for large, distributed systems.

Set the cross application tracing options in the cross_application_tracer section. These settings can be overridden with a newrelic.config.cross_application_tracer prefixed system property.

Cross application tracing adds request and response headers to external calls using the Apache HttpClient libraries. This provides better performance data when calling applications monitored by other New Relic agents.

Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.