Configure the Java agent for Splunk Observability Cloud

Configure the agent of the Splunk Distribution of OpenTelemetry Java to suit most of your instrumentation needs, like correlating traces with logs, activating custom sampling, and more.

You can configure the Java agent from the Splunk Distribution of OpenTelemetry Java to suit most of your instrumentation needs. In most cases, modifying the basic configuration is enough to get started. More advanced settings are also available.

The following sections describe all available settings for configuring the Java Virtual Machine (JVM) agent, including options for activating new features that are unique to the Splunk Distribution of OpenTelemetry Java.

Configuration methods

You can change the agent settings in two ways:

  • Set an environment variable. For example:

    Linux
    SHELL
    export OTEL_SERVICE_NAME=my-java-app
    Windows PowerShell
    SHELL
    $env:OTEL_SERVICE_NAME=my-java-app
  • Add a system property as runtime parameter. For example:

    SHELL
    java -javaagent:./splunk-otel-javaagent.jar \
    -Dotel.service.name=<my-java-app> \
    -jar <myapp>.jar

Environment variables are the preferred way of configuring OpenTelemetry agents. System properties, if specified, override existing environment variables.

General settings

The following settings are specific to the Splunk Distribution of OpenTelemetry Java:

Environment variable Description Default Type System property
OTEL_SDK_​DISABLED If true, disable the OpenTelemetry SDK. Defaults to false. 'false' boolean otel.sdk.disabled
OTEL_PROPAGATORS The propagators to be used. Use a comma-separated list for multiple propagators. Default is tracecontext,baggage (W3C).

tracecontext

baggage

string otel.propagators
OTEL_BSP_SCHEDULE_DELAY The interval, in milliseconds, between two consecutive exports. Default is 5000. '5000' int otel.bsp.schedule.delay
OTEL_BSP_MAX_QUEUE_SIZE The maximum queue size. Default is 2048. '2048' int otel.bsp.max.queue.size
OTEL_BSP_MAX_EXPORT_BATCH_SIZE The maximum batch size. Default is 512. '512' int otel.bsp.max.export.batch.size
OTEL_BSP_EXPORT_TIMEOUT The maximum allowed time, in milliseconds, to export data. Default is 30000. '30000' int otel.bsp.export.timeout
OTEL_TRACES_SAMPLER The sampler to use for tracing. Defaults to parentbased_always_on always_on string otel.traces.sampler
OTEL_TRACES_SAMPLER_ARG An argument to the configured tracer if supported, for example a ratio. '' string otel.traces.sampler.arg
OTEL_METRICS_EXEMPLAR_FILTER The filter for exemplar sampling. Can be ALWAYS_OFF, ALWAYS_ON or TRACE_BASED. Default is TRACE_BASED. TRACE_BASED string otel.metrics.exemplar.filter
OTEL_BLRP_SCHEDULE_DELAY The interval, in milliseconds, between two consecutive exports. Default is 1000. '1000' int otel.blrp.schedule.delay
OTEL_BLRP_MAX_QUEUE_SIZE The maximum queue size. Default is 2048. '2048' int otel.blrp.max.queue.size
OTEL_BLRP_MAX_EXPORT_BATCH_SIZE The maximum batch size. Default is 512. '512' int otel.blrp.max.export.batch.size
OTEL_BLRP_EXPORT_TIMEOUT The maximum allowed time, in milliseconds, to export data. Default is 30000. '30000' int otel.blrp.export.timeout
OTEL_EXPERIMENTAL_CONFIG_FILE The path to the SDK configuration file. Defaults to unset. '' string otel.experimental.config.file
OTEL_JAVAAGENT_CONFIGURATION_FILE Path to valid Java properties file which contains the agent configuration. '' string otel.javaagent.configuration-file
OTEL_JAVAAGENT_EXTENSIONS Path to an extension jar file or folder, containing jar files. If pointing to a folder, every jar file in that folder will be treated as separate, independent extension. '' string otel.javaagent.extensions
OTEL_JAVAAGENT_LOGGING The Java agent logging mode. The following 3 modes are supported: simple: The agent will print out its logs using the standard error stream. Only INFO or higher logs will be printed. This is the default Java agent logging mode. none: The agent will not log anything - not even its own version. application: The agent will attempt to redirect its own logs to the instrumented application's slf4j logger. This works the best for simple one-jar applications that do not use multiple classloaders; Spring Boot apps are supported as well. The Java agent output logs can be further configured using the instrumented application's logging configuration (e.g. logback.xml or log4j2.xml). Make sure to test that this mode works for your application before running it in a production environment. simple string otel.javaagent.logging
OTEL_JAVAAGENT_EXCLUDE_CLASSES Suppresses all instrumentation for specific classes, format is "my.package.MyClass,my.package2.*". '' string otel.javaagent.exclude-classes
OTEL_JAVAAGENT_EXCLUDE_CLASS_LOADERS Ignore the specified class loaders, format is "my.package.MyClass,my.package2.". '' string otel.javaagent.exclude-class-loaders
OTEL_JAVAAGENT_EXPERIMENTAL_​SECURITY_MANAGER_SUPPORT_ENABLED 'Grant all privileges to agent code. Disclaimer: agent can provide application means for escaping security manager sandbox. Do not usethis option if your application relies on security manager to run untrusted code.' 'false' boolean otel.javaagent.experimental.security-manager-support.enabled
SPLUNK_ACCESS_TOKEN (Optional) Auth token allowing exporters to communicate directly with the Splunk cloud, passed as X-SF-TOKEN header. '' string splunk.access.token
SPLUNK_REALM The Splunk Observability Cloud realm where the telemetry should be sent to. For example, us0 or us1. Defaults to none, which means that data goes to a Splunk OpenTelemetry Collector deployed on localhost. none string splunk.realm
SPLUNK_METRICS_FORCE_​FULL_COMMANDLINE Adds the full command line as a resource attribute for all metrics. If false, commands longer than 255 characters are truncated. 'false' boolean splunk.metrics.force_full_commandline
SPLUNK_TRACE_RESPONSE_HEADER_ENABLED Enables adding server trace information to HTTP response headers. [See this document](https://docs.splunk.com/observability/en/gdi/get-data-in/application/java/configuration/advanced-java-otel-configuration.html#server-trace-information) for more information. 'true' boolean splunk.trace-response-header.enabled

Example of trace sampling

The following example shows how to use the rules traces sampler to exclude the /healthcheck endpoint from monitoring:

BASH
export OTEL_TRACES_SAMPLER=rules
export OTEL_TRACES_SAMPLER_ARG=drop=/healthcheck;fallback=parentbased_always_on

All requests to downstream services that happen as a consequence of calling an excluded endpoint are also excluded.

Considerations on trace propagation

For backward compatibility with older versions of the Splunk Distribution of OpenTelemetry Java or the SignalFx Java Agent, use the b3multi trace propagator:

Linux
SHELL
export OTEL_PROPAGATORS=b3multi
Windows PowerShell
SHELL
$env:OTEL_PROPAGATORS=b3multi

Instrumentation configuration

The following settings control the instrumentation, including tracing and :

Environment variable Description Default Type System property
OTEL_RESOURCE_ATTRIBUTES 'Specify resource attributes in the following format: key1=val1,key2=val2,key3=val3' '' string otel.resource.attributes
OTEL_SERVICE_NAME Specify logical service name. Takes precedence over service.name defined with otel.resource.attributes '' string otel.service.name
OTEL_EXPERIMENTAL_​RESOURCE_​​DISABLED_KEYS Specify resource attribute keys that are filtered. '' string otel.experimental.resource.disabled-keys
OTEL_ATTRIBUTE_​VALUE_​LENGTH_LIMIT The maximum length of attribute values. Applies to spans and logs. By default there is no limit. '' int otel.attribute.value.length.limit
OTEL_ATTRIBUTE_​​COUNT_LIMIT The maximum number of attributes. Applies to spans, span events, span links, and logs. Default is 128. '128' int otel.attribute.count.limit
'' The maximum length of span attribute values. Takes precedence over otel.attribute.value.length.limit. By default there is no limit. OTEL_SPAN_ATTRIBUTE_VALUE_​​LENGTH_LIMIT int otel.span.attribute.value.length.limit
OTEL_SPAN_ATTRIBUTE_​​COUNT_LIMIT The maximum number of attributes per span. Takes precedence over otel.attribute.count.limit. Default is 128. '128' int otel.span.attribute.count.limit
OTEL_SPAN_EVENT_​COUNT_​LIMIT The maximum number of events per span. Default is 128. '128' int otel.span.event.count.limit
OTEL_SPAN_LINK_​COUNT_​LIMIT The maximum number of links per span. Default is 128. '128' int otel.span.link.count.limit
OTEL_JAVA_METRICS_​​CARDINALITY_​LIMIT If set, configure cardinality limit. The value dictates the maximum number of distinct points per metric. Default is 2000. '2000' int otel.java.metrics.cardinality.limit
OTEL_INSTRUMENTATION_COMMON_​​​​PEER_SERVICE_MAPPING Used to specify a mapping from host names or IP addresses to peer services, as a comma-separated list of <host_or_ip>=<user_assigned_name> pairs. The peer service is added as an attribute to a span whose host or IP address match the mapping. '' string otel.instrumentation.common.peer-service-mapping
OTEL_INSTRUMENTATION_COMMON_​​​​DB_STATEMENT_SANITIZER_ENABLED Enables the DB statement sanitization. 'true' boolean otel.instrumentation.common.db-statement-sanitizer.enabled
OTEL_INSTRUMENTATION_HTTP_​​CLIENT_​​CAPTURE_REQUEST_HEADERS A comma-separated list of HTTP header names. HTTP client instrumentations will capture HTTP request header values for all configured header names. '' string otel.instrumentation.http.client.capture-request-headers
OTEL_INSTRUMENTATION_HTTP_​​CLIENT_​​CAPTURE_RESPONSE_HEADERS A comma-separated list of HTTP header names. HTTP client instrumentations will capture HTTP response header values for all configured header names. '' string otel.instrumentation.http.client.capture-response-headers
OTEL_INSTRUMENTATION_HTTP_​​SERVER_​​CAPTURE_REQUEST_HEADERS A comma-separated list of HTTP header names. HTTP server instrumentations will capture HTTP request header values for all configured header names. '' string otel.instrumentation.http.server.capture-request-headers
OTEL_INSTRUMENTATION_HTTP_​​SERVER_​​CAPTURE_RESPONSE_HEADERS A comma-separated list of HTTP header names. HTTP server instrumentations will capture HTTP response header values for all configured header names. '' string otel.instrumentation.http.server.capture-response-headers
OTEL_INSTRUMENTATION_SERVLET_​​​​EXPERIMENTAL_CAPTURE_REQUEST_PARAMETERS A comma-separated list of request parameter names. '' string otel.instrumentation.servlet.experimental.capture-request-parameters
OTEL_INSTRUMENTATION_MESSAGING_​​​​EXPERIMENTAL_RECEIVE_TELEMETRY_ENABLED Enables the consumer message receive telemetry. Note that this will cause the consumer side to start a new trace, with only a span link connecting it to the producer trace. 'false' boolean otel.instrumentation.messaging.experimental.receive-telemetry.enabled
OTEL_INSTRUMENTATION_COMMON_​​​​ENDUSER_ENABLED Common flag for enabling/disabling enduser attributes. 'false' boolean otel.instrumentation.common.enduser.enabled
OTEL_INSTRUMENTATION_COMMON_​​​​ENDUSER_ID_ENABLED Determines whether to capture `enduser.id` semantic attribute. 'false' boolean otel.instrumentation.common.enduser.id.enabled
OTEL_INSTRUMENTATION_COMMON_​​​​ENDUSER_ROLE_ENABLED Determines whether to capture `enduser.role` semantic attribute. 'false' boolean otel.instrumentation.common.enduser.role.enabled
OTEL_INSTRUMENTATION_COMMON​_​​​ENDUSER_SCOPE_ENABLED Determines whether to capture `enduser.scope` semantic attribute. 'false' boolean otel.instrumentation.common.enduser.scope.enabled
OTEL_INSTRUMENTATION_HTTP_​​​CLIENT_​EMIT_EXPERIMENTAL_TELEMETRY Enables experimental http client telemetry. 'false' boolean otel.instrumentation.http.client.emit-experimental-telemetry
OTEL_INSTRUMENTATION_HTTP_​​​SERVER_​EMIT_EXPERIMENTAL_TELEMETRY Enables experimental http server telemetry. 'false' boolean otel.instrumentation.http.server.emit-experimental-telemetry
OTEL_INSTRUMENTATION_HTTP_​​CLIENT_​​EXPERIMENTAL_REDACT_QUERY_PARAMETERS Redact sensitive parameter values from URL query string, see https://opentelemetry.io/docs/specs/semconv/http/http-spans. 'true' boolean otel.instrumentation.http.client.experimental.redact-query-parameters
OTEL_INSTRUMENTATION_COMMON_​​​DEFAULT_ENABLED Disable all instrumentations in the agent. 'true' boolean otel.instrumentation.common.default-enabled
OTEL_INSTRUMENTATION_{NAME}_​ENABLED Suppresses agent instrumentation of specific library where `{name}` is the corresponding instrumentation name. '' boolean otel.instrumentation.{name}.enabled
OTEL_INSTRUMENTATION_COMMON_​​​​EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED Enables the controller telemetry. 'false' boolean otel.instrumentation.common.experimental.controller-telemetry.enabled
OTEL_INSTRUMENTATION_COMMON_​​​​EXPERIMENTAL_VIEW_TELEMETRY_ENABLED Enables the view telemetry. 'false' boolean otel.instrumentation.common.experimental.view-telemetry.enabled
OTEL_INSTRUMENTATION_​EXPERIMENTAL_​​​SPAN_SUPPRESSION_STRATEGY The Java agent span suppression strategy. The following 3 strategies are supported: semconv: The agent will suppress duplicate semantic conventions. This is the default behavior of the Java agent. span-kind: The agent will suppress spans with the same kind (except INTERNAL). none: The agent will not suppress anything at all. We do not recommend using this option for anything other than debug purposes, as it generates lots of duplicate telemetry data. semconv string otel.instrumentation.experimental.span-suppression-strategy
OTEL_EXPERIMENTAL_​​JAVASCRIPT_​SNIPPET Experimental setting to inject a JavaScript snippet into servlet HTML responses after the opening head tag. '' string otel.experimental.javascript-snippet
OTEL_INSTRUMENTATION_​METHODS_​INCLUDE Same as adding @WithSpan annotation functionality for the target method string, e.g. my.package.MyClass1[method1,method2];my.package.MyClass2[method3] '' string otel.instrumentation.methods.include
OTEL_INSTRUMENTATION_​OPENTELEMETRY_​​​ANNOTATIONS_EXCLUDE_METHODS Suppress @WithSpan instrumentation for specific methods, e.g. my.package.MyClass1[method1,method2];my.package.MyClass2[method3] '' string otel.instrumentation.opentelemetry-annotations.exclude-methods
OTEL_INSTRUMENTATION_AWS_​SDK_​​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.aws-sdk.experimental-span-attributes
OTEL_INSTRUMENTATION_AWS_​SDK_​​​EXPERIMENTAL_USE_PROPAGATOR_FOR_MESSAGING v2 only, inject into SNS/SQS attributes with configured propagator. 'false' boolean otel.instrumentation.aws-sdk.experimental-use-propagator-for-messaging
OTEL_INSTRUMENTATION_AWS_​SDK_​​​EXPERIMENTAL_USE_PROPAGATOR_FOR_MESSAGING v2 only, record errors returned by each individual HTTP request as events for the SDK span. 'false' boolean otel.instrumentation.aws-sdk.experimental-use-propagator-for-messaging
OTEL_INSTRUMENTATION_GENAI_​​​​CAPTURE_MESSAGE_CONTENT v2 only, record content of user and LLM messages when using Bedrock. 'false' boolean otel.instrumentation.genai.capture-message-content
OTEL_INSTRUMENTATION_CAMEL_​​​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.camel.experimental-span-attributes
OTEL_INSTRUMENTATION_APACHE_​​​SHENYU_​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.apache-shenyu.experimental-span-attributes
OTEL_INSTRUMENTATION_COUCHBASE_​​​​EXPERIMENTAL_SPAN_ATTRIBUTES Enables the capture of experimental span attributes (for version 2.6 and higher of this instrumentation). 'false' boolean otel.instrumentation.couchbase.experimental-span-attributes
OTEL_INSTRUMENTATION_​ELASTICSEARCH_​​​CAPTURE_SEARCH_QUERY 'Enable the capture of search query bodies. Attention: Elasticsearch queries may contain personal or sensitive information.' 'false' boolean otel.instrumentation.elasticsearch.capture-search-query
OTEL_INSTRUMENTATION_​ELASTICSEARCH_​​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.elasticsearch.experimental-span-attributes
OTEL_INSTRUMENTATION_​GRAPHQL_QUERY_​​​SANITIZER_ENABLED Whether to remove sensitive information from query source that is added as span attribute. 'true' boolean otel.instrumentation.graphql.query-sanitizer.enabled
OTEL_INSTRUMENTATION_​GRAPHQL_ADD_​​OPERATION_NAME_TO_SPAN_NAME_ENABLED 'Whether GraphQL operation name is added to the span name. **WARNING**: GraphQL operation name is provided by the client and can have high cardinality. Use only when the server is not exposed to malicious clients.' 'false' boolean otel.instrumentation.graphql.add-operation-name-to-span-name.enabled
OTEL_INSTRUMENTATION_​GRAPHQL_DATA_​​FETCHER_ENABLED Whether to create spans for data fetchers (GraphQL 20 and later). 'false' boolean otel.instrumentation.graphql.data-fetcher.enabled
OTEL_INSTRUMENTATION_​GRAPHQL_​TRIVIAL_​DATA_FETCHER_ENABLED Whether to create spans for trivial data fetchers. A trivial data fetcher is one that simply maps data from an object to a field (GraphQL 20 and later). 'false' boolean otel.instrumentation.graphql.trivial-data-fetcher.enabled
OTEL_INSTRUMENTATION_​GRPC_EMIT_​​MESSAGE_EVENTS Determines whether to emit span event for each individual message received and sent. 'true' boolean otel.instrumentation.grpc.emit-message-events
OTEL_INSTRUMENTATION_​GRPC_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.grpc.experimental-span-attributes
OTEL_INSTRUMENTATION_​GRPC_CAPTURE_​​METADATA_CLIENT_REQUEST A comma-separated list of request metadata keys. gRPC client instrumentation will capture metadata values corresponding to configured keys as span attributes. '' string otel.instrumentation.grpc.capture-metadata.client.request
OTEL_INSTRUMENTATION_​GRPC_CAPTURE_​​METADATA_SERVER_REQUEST A comma-separated list of request metadata keys. gRPC server instrumentation will capture metadata values corresponding to configured keys as span attributes. '' string otel.instrumentation.grpc.capture-metadata.server.request
OTEL_INSTRUMENTATION_​GUAVA_​EXPERIMENTAL_​SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.guava.experimental-span-attributes
OTEL_INSTRUMENTATION_​HIBERNATE_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.hibernate.experimental-span-attributes
OTEL_INSTRUMENTATION_​HYSTRIX_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.hystrix.experimental-span-attributes
OTEL_INSTRUMENTATION_​JAVA_UTIL_​LOGGING_​EXPERIMENTAL_LOG_ATTRIBUTES Enable the capture of experimental log attributes `thread.name` and `thread.id`. 'false' boolean otel.instrumentation.java-util-logging.experimental-log-attributes
OTEL_INSTRUMENTATION_​JAXRS_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.jaxrs.experimental-span-attributes
OTEL_INSTRUMENTATION_​JBOSS_​LOGMANAGER_​EXPERIMENTAL_LOG_ATTRIBUTES Enable the capture of experimental log attributes. 'false' boolean otel.instrumentation.jboss-logmanager.experimental-log-attributes
OTEL_INSTRUMENTATION_​JBOSS_​LOGMANAGER_​EXPERIMENTAL_CAPTURE_MDC_ATTRIBUTES Comma separated list of MDC attributes to capture. Use the wildcard character `*` to capture all attributes. '' string otel.instrumentation.jboss-logmanager.experimental.capture-mdc-attributes
OTEL_INSTRUMENTATION_​JDBC_​STATEMENT_​SANITIZER_ENABLED Enables the DB statement sanitization. 'true' boolean otel.instrumentation.jdbc.statement-sanitizer.enabled
OTEL_INSTRUMENTATION_​JDBC_​EXPERIMENTAL_​CAPTURE_QUERY_PARAMETERS 'Enable the capture of query parameters as span attributes. Enabling this option disables the statement sanitization. WARNING: captured query parameters may contain sensitive information such as passwords, personally identifiable information or protected health info.' 'false' boolean otel.instrumentation.jdbc.experimental.capture-query-parameters
OTEL_INSTRUMENTATION_​JDBC_​EXPERIMENTAL_​TRANSACTION_ENABLED Enables experimental instrumentation to create spans for COMMIT and ROLLBACK operations. 'false' boolean otel.instrumentation.jdbc.experimental.transaction.enabled
OTEL_INSTRUMENTATION_​JSP_​EXPERIMENTAL_​SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.jsp.experimental-span-attributes
OTEL_INSTRUMENTATION_​KAFKA_​EXPERIMENTAL_​SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.kafka.experimental-span-attributes
OTEL_INSTRUMENTATION_​KAFKA_​PRODUCER_PROPAGATION_ENABLED Enable context propagation for kafka message producer. 'true' boolean otel.instrumentation.kafka.producer-propagation.enabled
OTEL_INSTRUMENTATION_​KUBERNETES_​CLIENT_​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.kubernetes-client.experimental-span-attributes
OTEL_INSTRUMENTATION_​​LETTUCE_EXPERIMENTAL_​SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.lettuce.experimental-span-attributes
OTEL_INSTRUMENTATION_​LOG4J_​APPENDER_​EXPERIMENTAL_LOG_ATTRIBUTES Enable the capture of experimental log attributes `thread.name` and `thread.id`. 'false' boolean otel.instrumentation.log4j-appender.experimental-log-attributes
OTEL_INSTRUMENTATION_​LOG4J_​APPENDER_​EXPERIMENTAL_CAPTURE_CODE_ATTRIBUTES Enable the capture of [source code attributes](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#source-code-attributes). Note that capturing source code attributes at logging sites might add a performance overhead. 'false' boolean otel.instrumentation.log4j-appender.experimental.capture-code-attributes
OTEL_INSTRUMENTATION_​LOG4J_​APPENDER_​EXPERIMENTAL_CAPTURE_MAP_MESSAGE_ATTRIBUTES Enable the capture of `MapMessage` attributes. 'false' boolean otel.instrumentation.log4j-appender.experimental.capture-map-message-attributes
OTEL_INSTRUMENTATION_​LOG4J_​APPENDER_​EXPERIMENTAL_CAPTURE_MARKER_ATTRIBUTE Enable the capture of Log4j markers as attributes. 'false' boolean otel.instrumentation.log4j-appender.experimental.capture-marker-attribute
OTEL_INSTRUMENTATION_​LOG4J_​APPENDER_​EXPERIMENTAL_CAPTURE_MDC_ATTRIBUTES Comma separated list of context data attributes to capture. Use the wildcard character `*` to capture all attributes. '' string otel.instrumentation.log4j-appender.experimental.capture-mdc-attributes
OTEL_INSTRUMENTATION_​LOG4J_​CONTEXT_DATA_ADD_BAGGAGE Enable exposing baggage attributes through MDC. 'false' boolean otel.instrumentation.log4j-context-data.add-baggage
OTEL_INSTRUMENTATION_​COMMON_​MDC_​RESOURCE_ATTRIBUTES Comma separated list of resource attributes to expose through MDC. '' string otel.instrumentation.common.mdc.resource-attributes
OTEL_INSTRUMENTATION_​COMMON_​LOGGING_​TRACE_ID Customize MDC key name for the trace id. trace_id string otel.instrumentation.common.logging.trace-id
OTEL_INSTRUMENTATION_​COMMON_​​LOGGING_SPAN_ID Customize MDC key name for the span id. span_id string otel.instrumentation.common.logging.span-id
OTEL_INSTRUMENTATION_​COMMON_​LOGGING_​TRACE_FLAGS Customize MDC key name for the trace flags. trace_flags string otel.instrumentation.common.logging.trace-flags
OTEL_INSTRUMENTATION_​LOGBACK_​APPENDER_​EXPERIMENTAL_LOG_ATTRIBUTES Enable the capture of experimental log attributes `thread.name` and `thread.id`. 'false' boolean otel.instrumentation.logback-appender.experimental-log-attributes
OTEL_INSTRUMENTATION_​LOGBACK_​APPENDER_​EXPERIMENTAL_CAPTURE_CODE_ATTRIBUTES Enable the capture of [source code attributes](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#source-code-attributes). Note that capturing source code attributes at logging sites might add a performance overhead. 'false' boolean otel.instrumentation.logback-appender.experimental.capture-code-attributes
OTEL_INSTRUMENTATION_​LOGBACK_​APPENDER_​EXPERIMENTAL_CAPTURE_MARKER_ATTRIBUTE Enable the capture of Logback markers as attributes. 'false' boolean otel.instrumentation.logback-appender.experimental.capture-marker-attribute
OTEL_INSTRUMENTATION_​LOGBACK_​APPENDER_​EXPERIMENTAL_CAPTURE_KEY_VALUE_PAIR_ATTRIBUTES Enable the capture of Logback key value pairs as attributes. 'false' boolean otel.instrumentation.logback-appender.experimental.capture-key-value-pair-attributes
OTEL_INSTRUMENTATION_​LOGBACK_​APPENDER_​EXPERIMENTAL_CAPTURE_LOGGER_CONTEXT_ATTRIBUTES Enable the capture of Logback logger context properties as attributes. 'false' boolean otel.instrumentation.logback-appender.experimental.capture-logger-context-attributes
OTEL_INSTRUMENTATION_​LOGBACK_​APPENDER_​EXPERIMENTAL_CAPTURE_ARGUMENTS Enable the capture of Logback logger arguments. 'false' boolean otel.instrumentation.logback-appender.experimental.capture-arguments
OTEL_INSTRUMENTATION_​LOGBACK_​APPENDER_​EXPERIMENTAL_CAPTURE_MDC_ATTRIBUTES Comma separated list of MDC attributes to capture. Use the wildcard character `*` to capture all attributes. '' string otel.instrumentation.logback-appender.experimental.capture-mdc-attributes
OTEL_INSTRUMENTATION_​LOGBACK_​​MDC_ADD_BAGGAGE Enable exposing baggage attributes through MDC. 'false' boolean otel.instrumentation.logback-mdc.add-baggage
OTEL_INSTRUMENTATION_​COMMON_​MDC_​RESOURCE_ATTRIBUTES Comma separated list of resource attributes to expose through MDC. '' string otel.instrumentation.common.mdc.resource-attributes
OTEL_INSTRUMENTATION_​MICROMETER_​​BASE_TIME_UNIT Set the base time unit for the OpenTelemetry `MeterRegistry` implementation. Valid values: `ns`, `nanoseconds`, `us`, `microseconds`, `ms`, `milliseconds`, `s`, `seconds`, `min`, `minutes`, `h`, `hours`, `d`, `days` s string otel.instrumentation.micrometer.base-time-unit
OTEL_INSTRUMENTATION_​MICROMETER_​​PROMETHEUS_MODE_ENABLED Enable the "Prometheus mode" this will simulate the behavior of Micrometer's PrometheusMeterRegistry. The instruments will be renamed to match Micrometer instrument naming, and the base time unit will be set to seconds. 'false' boolean otel.instrumentation.micrometer.prometheus-mode.enabled
OTEL_INSTRUMENTATION_​MICROMETER_​​HISTOGRAM_GAUGES_ENABLED Enables the generation of gauge-based Micrometer histograms for `DistributionSummary` and `Timer` instruments. 'false' boolean otel.instrumentation.micrometer.histogram-gauges.enabled
OTEL_INSTRUMENTATION_​MONGO_​STATEMENT_​SANITIZER_ENABLED Enables the DB statement sanitization. 'true' boolean otel.instrumentation.mongo.statement-sanitizer.enabled
OTEL_INSTRUMENTATION_​NETTY_​CONNECTION_​TELEMETRY_ENABLED Enable the creation of Connect and DNS spans by default for Netty 4.0 and higher instrumentation. 'false' boolean otel.instrumentation.netty.connection-telemetry.enabled
OTEL_INSTRUMENTATION_​NETTY_SSL_​​TELEMETRY_ENABLED Enable SSL telemetry for Netty 4.0 and higher instrumentation. 'false' boolean otel.instrumentation.netty.ssl-telemetry.enabled
OTEL_INSTRUMENTATION_​GENAI_CAPTURE_​MESSAGE_CONTENT Record content of user and LLM messages. 'false' boolean otel.instrumentation.genai.capture-message-content
OTEL_INSTRUMENTATION_​OPENTELEMETRY_​​ANNOTATIONS_EXCLUDE_METHODS All methods to be excluded from auto-instrumentation by annotation-based advices. '' string otel.instrumentation.opentelemetry-annotations.exclude-methods
OTEL_INSTRUMENTATION_​OPENTELEMETRY_​​INSTRUMENTATION_ANNOTATIONS_EXCLUDE_METHODS All methods to be excluded from auto-instrumentation by annotation-based advices. '' string otel.instrumentation.opentelemetry-instrumentation-annotations.exclude-methods
OTEL_INSTRUMENTATION_​OSHI_​​EXPERIMENTAL_METRICS_ENABLED Enable the OSHI metrics. 'false' boolean otel.instrumentation.oshi.experimental-metrics.enabled
OTEL_INSTRUMENTATION_​POWERJOB_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.powerjob.experimental-span-attributes
OTEL_INSTRUMENTATION_​PULSAR_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.pulsar.experimental-span-attributes
OTEL_INSTRUMENTATION_​QUARTZ_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.quartz.experimental-span-attributes
OTEL_INSTRUMENTATION_​R2DBC_​​STATEMENT_SANITIZER_ENABLED Enables the DB statement sanitization. 'true' boolean otel.instrumentation.r2dbc.statement-sanitizer.enabled
OTEL_INSTRUMENTATION_​RABBITMQ_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.rabbitmq.experimental-span-attributes
OTEL_INSTRUMENTATION_​REACTOR_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.reactor.experimental-span-attributes
OTEL_INSTRUMENTATION_​REACTOR_NETTY_​​CONNECTION_TELEMETRY_ENABLED Enable the creation of Connect and DNS spans by default. 'false' boolean otel.instrumentation.reactor-netty.connection-telemetry.enabled
OTEL_INSTRUMENTATION_​ROCKETMQ_CLIENT_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.rocketmq-client.experimental-span-attributes
OTEL_INSTRUMENTATION_​RUNTIME_TELEMETRY_​​EMIT_EXPERIMENTAL_TELEMETRY Enable the capture of experimental metrics. 'false' boolean otel.instrumentation.runtime-telemetry.emit-experimental-telemetry
OTEL_INSTRUMENTATION_​RUNTIME_​TELEMETRY_​JAVA17_ENABLE_ALL Enable the capture of all JFR based metrics. 'false' boolean otel.instrumentation.runtime-telemetry-java17.enable-all
OTEL_INSTRUMENTATION_​RUNTIME_​TELEMETRY_​JAVA17_ENABLED Enable the capture of JFR based metrics. 'false' boolean otel.instrumentation.runtime-telemetry-java17.enabled
OTEL_INSTRUMENTATION_​RUNTIME_TELEMETRY_​​PACKAGE_EMITTER_ENABLED Enable creating events for JAR libraries used by the application. 'false' boolean otel.instrumentation.runtime-telemetry.package-emitter.enabled
OTEL_INSTRUMENTATION_​RUNTIME_TELEMETRY_​​PACKAGE_EMITTER_JARS_PER_SECOND The number of JAR files processed per second. '10' int otel.instrumentation.runtime-telemetry.package-emitter.jars-per-second
OTEL_INSTRUMENTATION_​RXJAVA_EXPERIMENTAL_​​SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.rxjava.experimental-span-attributes
OTEL_INSTRUMENTATION_​SERVLET_​EXPERIMENTAL_​SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.servlet.experimental-span-attributes
OTEL_INSTRUMENTATION_​SPRING_BATCH_​​ITEM_ENABLED Enable creating span for each item. 'false' boolean otel.instrumentation.spring-batch.item.enabled
OTEL_INSTRUMENTATION_​SPRING_BATCH_​​EXPERIMENTAL_CHUNK_NEW_TRACE Enable staring a new trace for each chunk. 'false' boolean otel.instrumentation.spring-batch.experimental.chunk.new-trace
OTEL_INSTRUMENTATION_​SPRING_SCHEDULING_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes for Spring Batch version 3.0. 'false' boolean otel.instrumentation.spring-scheduling.experimental-span-attributes
OTEL_INSTRUMENTATION_​SPRING_INTEGRATION_​​GLOBAL_CHANNEL_INTERCEPTOR_PATTERNS An array of Spring channel name patterns that will be intercepted. See [Spring Integration docs](https://docs.spring.io/spring-integration/reference/channel/configuration.html#global-channel-configuration-interceptors) for more details. '*' string otel.instrumentation.spring-integration.global-channel-interceptor-patterns
OTEL_INSTRUMENTATION_​SPRING_​INTEGRATION_​PRODUCER_ENABLED Create producer spans when messages are sent to an output channel. Enable when you're using a messaging library that doesn't have its own instrumentation for generating producer spans. Note that the detection of output channels only works for [Spring Cloud Stream](https://spring.io/projects/spring-cloud-stream) `DirectWithAttributesChannel`. 'false' boolean otel.instrumentation.spring-integration.producer.enabled
OTEL_INSTRUMENTATION_​SPRING_SCHEDULING_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes for Spring Scheduling version 3.1. 'false' boolean otel.instrumentation.spring-scheduling.experimental-span-attributes
OTEL_INSTRUMENTATION_​SPRING_WEBFLUX_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes for Spring WebFlux version 5.0. 'false' boolean otel.instrumentation.spring-webflux.experimental-span-attributes
OTEL_INSTRUMENTATION_​SPRING_WEBMVC_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes for Spring Web MVC version 3.1. 'false' boolean otel.instrumentation.spring-webmvc.experimental-span-attributes
OTEL_INSTRUMENTATION_​SPRING_CLOUD_​​GATEWAY_EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.spring-cloud-gateway.experimental-span-attributes
OTEL_INSTRUMENTATION_​SPRING_SECURITY_​​ENDUSER_ROLE_GRANTED_AUTHORITY_PREFIX Prefix of granted authorities identifying roles to capture in the `enduser.role` semantic attribute. ROLE_ string otel.instrumentation.spring-security.enduser.role.granted-authority-prefix
OTEL_INSTRUMENTATION_​SPRING_SECURITY_​​ENDUSER_SCOPE_GRANTED_AUTHORITY_PREFIX Prefix of granted authorities identifying scopes to capture in the `enduser.scopes` semantic attribute. SCOPE_ string otel.instrumentation.spring-security.enduser.scope.granted-authority-prefix
OTEL_INSTRUMENTATION_​SPYMEMCACHED_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.spymemcached.experimental-span-attributes
OTEL_INSTRUMENTATION_​TWILIO_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.twilio.experimental-span-attributes
OTEL_INSTRUMENTATION_​XXL_JOB_​​EXPERIMENTAL_SPAN_ATTRIBUTES Enable the capture of experimental span attributes. 'false' boolean otel.instrumentation.xxl-job.experimental-span-attributes

Exporters configuration

The following settings control trace exporters and their endpoints:

Environment variable Description Default Type System property
OTEL_TRACES_EXPORTER List of exporters to be used for tracing, separated by commas. Default is otlp. none means no autoconfigured exporter. otlp string otel.traces.exporter
OTEL_METRICS_EXPORTER List of exporters to be used for metrics, separated by commas. Default is otlp. none means no autoconfigured exporter. otlp string otel.metrics.exporter
OTEL_LOGS_EXPORTER List of exporters to be used for logging, separated by commas. Default is otlp. none means no autoconfigured exporter. otlp string otel.logs.exporter
OTEL_JAVA_EXPERIMENTAL_​​EXPORTER_MEMORY_MODE If `reusable_data`, enable reusable memory mode (on exporters which support it) to reduce allocations. Default is `immutable_data`. This option is experimental and subject to change or removal. immutable_data string otel.java.experimental.exporter.memory_mode
OTEL_EXPORTER_OTLP_​​ENDPOINT The OTLP traces, metrics, and logs endpoint to connect to. Must be a URL with a scheme of either http or https based on the use of TLS. If protocol is http/protobuf the version and signal will be appended to the path (e.g. v1/traces, v1/metrics, or v1/logs). Default is http://localhost:4317 when protocol is grpc, and http://localhost:4318/v1/{signal} when protocol is http/protobuf. http://localhost:4318 string otel.exporter.otlp.endpoint
OTEL_EXPORTER_OTLP_TRACES_​​ENDPOINT The OTLP traces endpoint to connect to. Must be a URL with a scheme of either http or https based on the use of TLS. Default is http://localhost:4317 when protocol is grpc, and http://localhost:4318/v1/traces when protocol is http/protobuf. http://localhost:4318/v1/traces string otel.exporter.otlp.traces.endpoint
OTEL_EXPORTER_OTLP_METRICS_​​ENDPOINT The OTLP metrics endpoint to connect to. Must be a URL with a scheme of either http or https based on the use of TLS. Default is http://localhost:4317 when protocol is grpc, and http://localhost:4318/v1/metrics when protocol is http/protobuf. http://localhost:4318/v1/metrics string otel.exporter.otlp.metrics.endpoint
OTEL_EXPORTER_OTLP_LOGS_​ENDPOINT The OTLP logs endpoint to connect to. Must be a URL with a scheme of either http or https based on the use of TLS. Default is http://localhost:4317 when protocol is grpc, and http://localhost:4318/v1/logs when protocol is http/protobuf. http://localhost:4318/v1/logs string otel.exporter.otlp.logs.endpoint
OTEL_EXPORTER_OTLP_​CERTIFICATE The path to the file containing trusted certificates to use when verifying an OTLP trace, metric, or log server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. By default the host platform's trusted root certificates are used. '' string otel.exporter.otlp.certificate
OTEL_EXPORTER_OTLP_TRACES_​​CERTIFICATE The path to the file containing trusted certificates to use when verifying an OTLP trace server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. By default the host platform's trusted root certificates are used. '' string otel.exporter.otlp.traces.certificate
OTEL_EXPORTER_OTLP_METRICS_​​CERTIFICATE The path to the file containing trusted certificates to use when verifying an OTLP metric server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. By default the host platform's trusted root certificates are used. '' string otel.exporter.otlp.metrics.certificate
OTEL_EXPORTER_OTLP_LOGS_​CERTIFICATE The path to the file containing trusted certificates to use when verifying an OTLP log server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. By default the host platform's trusted root certificates are used. '' string otel.exporter.otlp.logs.certificate
'' The path to the file containing private client key to use when verifying an OTLP trace, metric, or log client's TLS credentials. The file should contain one private key PKCS8 PEM format. By default no client key is used. OTEL_EXPORTER_OTLP_CLIENT_KEY string otel.exporter.otlp.client.key
OTEL_EXPORTER_OTLP_TRACES_​CLIENT_KEY The path to the file containing private client key to use when verifying an OTLP trace client's TLS credentials. The file should contain one private key PKCS8 PEM format. By default no client key file is used. '' string otel.exporter.otlp.traces.client.key
OTEL_EXPORTER_OTLP_METRICS_​​CLIENT_KEY The path to the file containing private client key to use when verifying an OTLP metric client's TLS credentials. The file should contain one private key PKCS8 PEM format. By default no client key file is used. '' string otel.exporter.otlp.metrics.client.key
OTEL_EXPORTER_OTLP_LOGS_​​CLIENT_KEY The path to the file containing private client key to use when verifying an OTLP log client's TLS credentials. The file should contain one private key PKCS8 PEM format. By default no client key file is used. '' string otel.exporter.otlp.logs.client.key
OTEL_EXPORTER_OTLP_CLIENT_​​CERTIFICATE The path to the file containing trusted certificates to use when verifying an OTLP trace, metric, or log client's TLS credentials. The file should contain one or more X.509 certificates in PEM format. By default no chain file is used. '' string otel.exporter.otlp.client.certificate
OTEL_EXPORTER_OTLP_TRACES_​CLIENT_​CERTIFICATE The path to the file containing trusted certificates to use when verifying an OTLP trace server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. By default no chain file is used. '' string otel.exporter.otlp.traces.client.certificate
OTEL_EXPORTER_OTLP_METRICS_​CLIENT_​CERTIFICATE The path to the file containing trusted certificates to use when verifying an OTLP metric server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. By default no chain file is used. '' string otel.exporter.otlp.metrics.client.certificate
OTEL_EXPORTER_OTLP_LOGS_CLIENT_​​CERTIFICATE The path to the file containing trusted certificates to use when verifying an OTLP log server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. By default no chain file is used. '' string otel.exporter.otlp.logs.client.certificate
OTEL_EXPORTER_OTLP_HEADERS Key-value pairs separated by commas to pass as request headers on OTLP trace, metric, and log requests. '' string otel.exporter.otlp.headers
OTEL_EXPORTER_OTLP_TRACES_​HEADERS Key-value pairs separated by commas to pass as request headers on OTLP trace requests. '' string otel.exporter.otlp.traces.headers
OTEL_EXPORTER_OTLP_METRICS_​HEADERS Key-value pairs separated by commas to pass as request headers on OTLP metrics requests. '' string otel.exporter.otlp.metrics.headers
OTEL_EXPORTER_OTLP_LOGS_​​HEADERS Key-value pairs separated by commas to pass as request headers on OTLP logs requests. '' string otel.exporter.otlp.logs.headers
OTEL_EXPORTER_OTLP_​COMPRESSION The compression type to use on OTLP trace, metric, and log requests. Options include gzip. By default no compression will be used. '' string otel.exporter.otlp.compression
OTEL_EXPORTER_OTLP_TRACES_​​COMPRESSION The compression type to use on OTLP trace requests. Options include gzip. By default no compression will be used. '' string otel.exporter.otlp.traces.compression
OTEL_EXPORTER_OTLP_METRICS_​​COMPRESSION The compression type to use on OTLP metric requests. Options include gzip. By default no compression will be used. '' string otel.exporter.otlp.metrics.compression
OTEL_EXPORTER_OTLP_LOGS_​COMPRESSION The compression type to use on OTLP log requests. Options include gzip. By default no compression will be used. '' string otel.exporter.otlp.logs.compression
OTEL_EXPORTER_OTLP_​TIMEOUT The maximum waiting time, in milliseconds, allowed to send each OTLP trace, metric, and log batch. Default is 10000. '10000' int otel.exporter.otlp.timeout
OTEL_EXPORTER_OTLP_TRACES_​TIMEOUT The maximum waiting time, in milliseconds, allowed to send each OTLP trace batch. Default is 10000. '10000' int otel.exporter.otlp.traces.timeout
OTEL_EXPORTER_OTLP_METRICS_​TIMEOUT The maximum waiting time, in milliseconds, allowed to send each OTLP metric batch. Default is 10000. '10000' int otel.exporter.otlp.metrics.timeout
OTEL_EXPORTER_OTLP_LOGS_​TIMEOUT The maximum waiting time, in milliseconds, allowed to send each OTLP log batch. Default is 10000. '10000' int otel.exporter.otlp.logs.timeout
OTEL_EXPORTER_OTLP_​PROTOCOL The transport protocol to use on OTLP trace, metric, and log requests. Options include grpc and http/protobuf. http/protobuf string otel.exporter.otlp.protocol
OTEL_EXPORTER_OTLP_TRACES_​PROTOCOL The transport protocol to use on OTLP trace requests. Options include grpc and http/protobuf. http/protobuf string otel.exporter.otlp.traces.protocol
OTEL_EXPORTER_OTLP_METRICS_​PROTOCOL The transport protocol to use on OTLP metric requests. Options include grpc and http/protobuf. http/protobuf string otel.exporter.otlp.metrics.protocol
OTEL_EXPORTER_OTLP_LOGS_​PROTOCOL The transport protocol to use on OTLP log requests. Options include grpc and http/protobuf. http/protobuf string otel.exporter.otlp.logs.protocol
OTEL_EXPORTER_OTLP_METRICS_​​TEMPORALITY_PREFERENCE The preferred output aggregation temporality. Options include DELTA, LOWMEMORY, and CUMULATIVE. If CUMULATIVE, all instruments will have cumulative temporality. If DELTA, counter (sync and async) and histograms will be delta, up down counters (sync and async) will be cumulative. If LOWMEMORY, sync counter and histograms will be delta, async counter and up down counters (sync and async) will be cumulative. Default is CUMULATIVE. CUMULATIVE string otel.exporter.otlp.metrics.temporality.preference
OTEL_EXPORTER_OTLP_METRICS_​DEFAULT_​HISTOGRAM_AGGREGATION The preferred default histogram aggregation. Options include BASE2_EXPONENTIAL_BUCKET_HISTOGRAM and EXPLICIT_BUCKET_HISTOGRAM. Default is EXPLICIT_BUCKET_HISTOGRAM. EXPLICIT_BUCKET_HISTOGRAM string otel.exporter.otlp.metrics.default.histogram.aggregation
OTEL_EXPERIMENTAL_EXPORTER_​OTLP_​RETRY_ENABLED If true, enable experimental retry support. Default is false. 'false' boolean otel.experimental.exporter.otlp.retry.enabled
OTEL_EXPORTER_ZIPKIN_​ENDPOINT The Zipkin endpoint to connect to. Default is http://localhost:9411/api/v2/spans. Currently only HTTP is supported. http://localhost:9411/api/v2/spans string otel.exporter.zipkin.endpoint
OTEL_METRIC_EXPORT_​INTERVAL The interval, in milliseconds, between the start of two export attempts. Default is 60000. '60000' int otel.metric.export.interval
OTEL_EXPORTER_PROMETHEUS_​PORT The local port used to bind the prometheus metric server. Default is 9464. '9464' int otel.exporter.prometheus.port
OTEL_EXPORTER_PROMETHEUS_​HOST The local address used to bind the prometheus metric server. Default is 0.0.0.0. 0.0.0.0 int otel.exporter.prometheus.host

The Splunk Distribution of OpenTelemetry Java uses the OTLP http/protobuf span exporter by default. To send data directly to Splunk Observability Cloud, see Send data directly to Splunk Observability Cloud.

Java settings for AlwaysOn Profiling

The following settings control the AlwaysOn Profiling feature for the Java agent:

Environment variable Description Default Type System property
SPLUNK_PROFILER_ENABLED Enables cpu profiler. 'false' boolean splunk.profiler.enabled
SPLUNK_PROFILER_DIRECTORY Location of JFR files, defaults to System.getProperty("java.io.tmpdir"). value of System.getProperty("java.io.tmpdir") string splunk.profiler.directory
SPLUNK_PROFILER_RECORDING_DURATION Recording unit duration. 20s string splunk.profiler.recording.duration
SPLUNK_PROFILER_KEEP_FILES Leave JFR files on disk if true. 'false' boolean splunk.profiler.keep-files
SPLUNK_PROFILER_LOGS_ENDPOINT Where to send OTLP logs, defaults to `otel.exporter.otlp.endpoint. http://localhost:4318/v1/logs string splunk.profiler.logs-endpoint
SPLUNK_PROFILER_CALL_STACK_INTERVAL How often to sample call stacks. 10000ms string splunk.profiler.call.stack.interval
SPLUNK_PROFILER_MEMORY_ENABLED Enables allocation profiler. 'false' boolean splunk.profiler.memory.enabled
SPLUNK_PROFILER_MEMORY_EVENT_RATE Allocation event rate. 150/s string splunk.profiler.memory.event.rate
SPLUNK_PROFILER_INCLUDE_INTERNAL_STACKS Set to `true` to include stack traces of agent internal threads and stack traces with only JDK internal frames. 'false' boolean splunk.profiler.include.internal.stacks
SPLUNK_PROFILER_TRACING_STACKS_ONLY Set to `true` to include only stack traces that are linked to a span context. 'false' boolean splunk.profiler.tracing.stacks.only
SPLUNK_PROFILER_OTLP_PROTOCOL The transport protocol to use on profiling OTLP log requests. Options include grpc and http/protobuf. http/protobuf string splunk.profiler.otlp.protocol

For more information on AlwaysOn Profiling, see Introduction to AlwaysOn Profiling for Splunk APM.

Server trace information

To connect Real User Monitoring (RUM) requests from mobile and web applications with server trace data, trace response headers are activated by default. The instrumentation adds the following response headers to HTTP responses:

DEFAULT
Access-Control-Expose-Headers: Server-Timing
Server-Timing: traceparent;desc="00-<serverTraceId>-<serverSpanId>-01"

The Server-Timing header contains the traceId and spanId parameters in traceparent format. For more information, see the Server-Timing and traceparent documentation on the W3C website.

The following server frameworks and libraries add Server-Timing information:

  • Servlet API versions 2.2 to 4.X.

  • Netty versions 3.8 to 4.0.

Note: If you need to deactivate trace response headers, set SPLUNK_TRACE_RESPONSE_HEADER_ENABLED to false.

Other settings

Environment variable

Description

OTEL_JAVAAGENT_ENABLED

Globally activates the Java agent automatic instrumentation. The default value is true. Useful for deactivating automatic discovery in testing scenarios or pipelines. System property: otel.javaagent.enabled.