Starting with Java agent version 9.1.0, OpenTelemetry Tracing, Metrics, and Logs API compatibility has been added, offering a "best-of-both-worlds" experience by combining New Relic's deep visibility with OpenTelemetry signals.
With this functionality, OpenTelemetry Tracing, Metrics, and Logs APIs may be used to directly custom instrument your application, in combination with New Relic Java agent APIs, while the Java agent seemlessly combines it all together into a familiar APM experience. Additionally, some libraries that provide OpenTelemetry native or standalone library instrumentation may be used to provide enhanced visibility into your application.
The following configuration options determine which OpenTelemetry signals should be captured and incorporated into the New Relic APM experience.
opentelemetry:
enabled:false
logs:
enabled:true
metrics:
enabled:true
include:"MeterName1,MeterName2"
exclude:"MeterName3,MeterName4"
traces:
enabled:true
include:"TracerName1,TracerName2"
exclude:"TracerName3,TracerName4"
Type
Boolean
Default
false
Set to true to allow individual OpenTelemetry signals to be enabled, false to disable all OpenTelemetry signals.
Default is false.
Can be set via the system property:
-Dnewrelic.config.opentelemetry.enabled=false
Can be set via the environment variable:
NEW_RELIC_OPENTELEMETRY_ENABLED
Type
Boolean
Default
true
Set to true to enable OpenTelemetry Logs signals when opentelemetry.enabled=true.
Default is true.
Can be set via the system property:
-Dnewrelic.config.opentelemetry.logs.enabled=true
Can be set via the environment variable:
NEW_RELIC_OPENTELEMETRY_LOGS_ENABLED
Type
Boolean
Default
true
Set to true to enable OpenTelemetry Metrics signals when opentelemetry.enabled=true.
Default is true.
A comma-delimited string of OpenTelemetry Meters (e.g. "MeterName1,MeterName2") whose signals should be included. By default, all Meters are included. This will override any default Meter excludes in the agent, effectively re-enabling them.
A comma-delimited string of OpenTelemetry Meters (e.g. "MeterName3,MeterName4") whose signals should be excluded.This takes precedence over all other includes/excludes sources, effectively disabling the listed Meters.
A comma-delimited string of OpenTelemetry Tracers (e.g. "TracerName1,TracerName2") whose signals should be included. By default, all Tracers are included. This will override any default Tracer excludes in the agent, effectively re-enabling them.
A comma-delimited string of OpenTelemetry Tracers (e.g. "TracerName3,TracerName4") whose signals should be excluded. This takes precedence over all other includes/excludes sources, effectively disabling the listed Tracers.