- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
After you set up the tracing library with your code and configure the Agent to collect APM data, optionally configure the tracing library as desired, including setting up Unified Service Tagging.
All configuration options below have system property and environment variable equivalents. If the same key type is set for both, the system property configuration takes priority. System properties can be set as JVM flags.
Unless otherwise stated, you can convert between system properties and environment variables with the following transformations:
.
or -
with _
.
For example, dd.service
becomes DD_SERVICE
._
with .
For example, DD_TAGS
becomes dd.tags
.Note: When using the Java tracer’s system properties, list the properties before -jar
. This ensures the properties are read in as JVM options.
dd.service
DD_SERVICE
unnamed-java-app
dd.env
DD_ENV
none
dd.version
DD_VERSION
null
dd.trace.enabled
DD_TRACE_ENABLED
true
false
tracing agent is disabled.dd.trace.config
DD_TRACE_CONFIG
null
-Ddd.trace.config=<FILE_PATH>.properties
, with setting the service name in the file with dd.service=<SERVICE_NAME>
dd.service.mapping
DD_SERVICE_MAPPING
null
mysql:my-mysql-service-name-db, postgresql:my-postgres-service-name-db
dd.writer.type
DD_WRITER_TYPE
DDAgentWriter
LoggingWriter
instead writes traces out to the console.dd.trace.agent.port
DD_TRACE_AGENT_PORT
8126
receiver_port
or DD_APM_RECEIVER_PORT
to something other than the default 8126
, then dd.trace.agent.port
or dd.trace.agent.url
must match it.dd.trace.agent.unix.domain.socket
DD_TRACE_AGENT_UNIX_DOMAIN_SOCKET
null
dd.trace.agent.url
DD_TRACE_AGENT_URL
null
receiver_port
or DD_APM_RECEIVER_PORT
to something other than the default 8126
, then dd.trace.agent.port
or dd.trace.agent.url
must match it. The URL value can start with http://
to connect using HTTP or with unix://
to use a Unix Domain Socket. When set this takes precedence over DD_AGENT_HOST
and DD_TRACE_AGENT_PORT
. Available for versions 0.65+.dd.trace.agent.timeout
DD_TRACE_AGENT_TIMEOUT
10
dd.trace.header.tags
DD_TRACE_HEADER_TAGS
null
CASE-insensitive-Header:my-tag-name,User-ID:userId,My-Header-And-Tag-Name
http.request.headers.<header-name>
and http.response.headers.<header-name>
respectively.-Ddd.trace.header.tags.legacy.parsing.enabled=true
or the environment variable DD_TRACE_HEADER_TAGS_LEGACY_PARSING_ENABLED=true
.DD_TRACE_HEADER_TAGS
in the Service Catalog UI.dd.trace.request_header.tags
DD_TRACE_REQUEST_HEADER_TAGS
null
CASE-insensitive-Header:my-tag-name,User-ID:userId,My-Header-And-Tag-Name
http.request.headers.<header-name>
.dd.trace.response_header.tags
DD_TRACE_RESPONSE_HEADER_TAGS
null
CASE-insensitive-Header:my-tag-name,User-ID:userId,My-Header-And-Tag-Name
http.response.headers.<header-name>
.dd.trace.header.baggage
DD_TRACE_HEADER_BAGGAGE
null
CASE-insensitive-Header:my-baggage-name,User-ID:userId,My-Header-And-Baggage-Name
dd.trace.annotations
DD_TRACE_ANNOTATIONS
com.some.Trace;io.other.Trace
@Trace
.dd.trace.methods
DD_TRACE_METHODS
null
package.ClassName[method1,method2,...];AnonymousClass$1[call];package.ClassName[*]
@Trace
, but without changing code. Note: The wildcard method support ([*]
) does not accommodate constructors, getters, setters, synthetic, toString, equals, hashcode, or finalizer method callsdd.trace.classes.exclude
DD_TRACE_CLASSES_EXCLUDE
null
package.ClassName,package.ClassName$Nested,package.Foo*,package.other.*
dd.trace.partial.flush.min.spans
DD_TRACE_PARTIAL_FLUSH_MIN_SPANS
1000
dd.trace.split-by-tags
DD_TRACE_SPLIT_BY_TAGS
null
aws.service
dd.trace.health.metrics.enabled
DD_TRACE_HEALTH_METRICS_ENABLED
true
true
sends tracer health metricsdd.trace.health.metrics.statsd.host
DD_TRACE_HEALTH_METRICS_STATSD_HOST
dd.jmxfetch.statsd.host
dd.trace.health.metrics.statsd.port
DD_TRACE_HEALTH_METRICS_STATSD_PORT
dd.jmxfetch.statsd.port
dd.trace.obfuscation.query.string.regexp
DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP
null
http.url
tag (matches are replaced with dd.trace.servlet.async-timeout.error
DD_TRACE_SERVLET_ASYNC_TIMEOUT_ERROR
true
dd.trace.startup.logs
DD_TRACE_STARTUP_LOGS
true
false
, informational startup logging is disabled. Available for versions 0.64+.dd.trace.servlet.principal.enabled
DD_TRACE_SERVLET_PRINCIPAL_ENABLED
false
true
, user principal is collected. Available for versions 0.61+.dd.trace.rate.limit
DD_TRACE_RATE_LIMIT
100
DD_TRACE_SAMPLING_RULES
or DD_TRACE_SAMPLE_RATE
is set. Otherwise, the Datadog Agent controls rate limiting.dd.http.server.tag.query-string
DD_HTTP_SERVER_TAG_QUERY_STRING
true
true
query string parameters and fragment get added to web server spansdd.http.server.route-based-naming
DD_HTTP_SERVER_ROUTE_BASED_NAMING
true
false
http framework routes are not used for resource names. This can change resource names and derived metrics if changed.dd.trace.128.bit.traceid.generation.enabled
DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED
true
true
, the tracer generates 128 bit Trace IDs, and encodes Trace IDs as 32 lowercase hexadecimal characters with zero padding.dd.trace.128.bit.traceid.logging.enabled
DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED
false
true
, the tracer will inject 128 bit Trace IDs as 32 lowercase hexadecimal characters with zero padding, and 64 bit Trace IDs as decimal numbers. Otherwise, the tracer always injects Trace IDs as decimal numbers.dd.trace.otel.enabled
DD_TRACE_OTEL_ENABLED
false
true
, OpenTelemetry-based tracing for custom instrumentation is enabled.dd.tags
DD_TAGS
null
layer:api,team:intake,key:value
dd.agent.host
DD_AGENT_HOST
localhost
dd.instrumentation.telemetry.enabled
DD_INSTRUMENTATION_TELEMETRY_ENABLED
true
true
, the tracer collects telemetry data. Available for versions 0.104+. Defaults to true
for versions 0.115+.dd.trace.db.client.split-by-instance
DD_TRACE_DB_CLIENT_SPLIT_BY_INSTANCE
false
true
db spans get assigned the instance name as the service namedd.trace.db.client.split-by-host
DD_TRACE_DB_CLIENT_SPLIT_BY_HOST
false
true
db spans get assigned the remote database hostname as the service namedd.http.client.tag.query-string
DD_HTTP_CLIENT_TAG_QUERY_STRING
false
true
query string parameters and fragment get added to web client spansdd.http.client.error.statuses
DD_HTTP_CLIENT_ERROR_STATUSES
400-499
dd.http.client.error.statuses=400-403,405,410-499
dd.http.server.error.statuses
DD_HTTP_SERVER_ERROR_STATUSES
500-599
dd.http.server.error.statuses=500,502-599
dd.grpc.client.error.statuses
DD_GRPC_CLIENT_ERROR_STATUSES
1-16
dd.grpc.client.error.statuses=1-4,7-10
dd.grpc.server.error.statuses
DD_GRPC_SERVER_ERROR_STATUSES
2-16
dd.grpc.server.error.statuses=2-4,7-10
dd.logs.injection
DD_LOGS_INJECTION
true
DD_LOGS_INJECTION
in the Service Catalog UI.For information about valid values and using the following configuration options, see Propagating Java Trace Context.
dd.trace.propagation.style.inject
DD_TRACE_PROPAGATION_STYLE_INJECT
datadog,tracecontext
dd.trace.propagation.style.extract
DD_TRACE_PROPAGATION_STYLE_EXTRACT
datadog,tracecontext
dd.trace.propagation.style
DD_TRACE_PROPAGATION_STYLE
datadog,tracecontext
dd.trace.propagation.style.inject
and dd.trace.propagation.style.extract
configuration settings take priority when present.trace.propagation.extract.first
DD_TRACE_PROPAGATION_EXTRACT_FIRST
false
true
, stop extracting trace context when a valid one is found.dd.jmxfetch.enabled
DD_JMXFETCH_ENABLED
true
dd.jmxfetch.config.dir
DD_JMXFETCH_CONFIG_DIR
null
/path/to/directory/etc/conf.d
jvm_direct:true
in the instance
section in the yaml
file to change configuration.dd.jmxfetch.config
DD_JMXFETCH_CONFIG
null
path/to/file/conf.yaml,other/path/to/file/conf.yaml
jvm_direct:true
in the instance
section in the yaml
file to change configuration.dd.jmxfetch.check-period
DD_JMXFETCH_CHECK_PERIOD
1500
dd.jmxfetch.refresh-beans-period
DD_JMXFETCH_REFRESH_BEANS_PERIOD
600
dd.jmxfetch.statsd.host
DD_JMXFETCH_STATSD_HOST
agent.host
unix:///var/datadog-agent/dsd.socket
dd.jmxfetch.statsd.port
DD_JMXFETCH_STATSD_PORT
8125
dd.jmxfetch.<integration-name>.enabled
DD_JMXFETCH_<INTEGRATION_NAME>_ENABLED
false
See how to disable integrations in the integrations compatibility section.
dd.integration.opentracing.enabled
DD_INTEGRATION_OPENTRACING_ENABLED
true
dd.hystrix.tags.enabled
DD_HYSTRIX_TAGS_ENABLED
false
dd.trace.elasticsearch.body.enabled
DD_TRACE_ELASTICSEARCH_BODY_ENABLED
false
true
, the body is added to Elasticsearch and OpenSearch spans.dd.trace.elasticsearch.params.enabled
DD_TRACE_ELASTICSEARCH_PARAMS_ENABLED
true
true
, the query string parameters are added to Elasticsearch and OpenSearch spans.Note:
If the same key type is set for both, the system property configuration takes priority.
System properties can be used as JVM parameters.
By default, JMX metrics from your application are sent to the Datadog Agent thanks to DogStatsD over port 8125
. Make sure that DogStatsD is enabled for the Agent.
DD_DOGSTATSD_NON_LOCAL_TRAFFIC
is set to true
, and that port 8125
is open on the Agent container.dd.service.mapping
Example with system property:
java -javaagent:/path/to/dd-java-agent.jar -Ddd.service=web-app -Ddd.service.mapping=postgresql:web-app-pg -jar path/to/application.jar
dd.tags
Setting a global env for spans and JMX metrics:
java -javaagent:/path/to/dd-java-agent.jar -Ddd.service=web-app -Ddd.env=dev -jar path/to/application.jar
dd.trace.span.tags
Example with adding project:test to every span:
java -javaagent:/path/to/dd-java-agent.jar -Ddd.service=web-app -Ddd.env=dev -Ddd.trace.span.tags=project:test -jar path/to/application.jar
dd.trace.jmx.tags
Setting custom.type:2 on a JMX metric:
java -javaagent:/path/to/dd-java-agent.jar -Ddd.service=web-app -Ddd.env=dev -Ddd.trace.span.tags=project:test -Ddd.trace.jmx.tags=custom.type:2 -jar path/to/application.jar
dd.trace.methods
Example with system property:
java -javaagent:/path/to/dd-java-agent.jar -Ddd.service=web-app -Ddd.env=dev -Ddd.trace.methods="hello.GreetingController[doSomeStuff,doSomeOtherStuff];hello.Randomizer[randomize]" -jar path/to/application.jar
dd.trace.db.client.split-by-instance
Example with system property:
java -javaagent:/path/to/dd-java-agent.jar -Ddd.env=dev -Ddd.service=web-app -Ddd.trace.db.client.split-by-instance=TRUE -jar path/to/application.jar
DB Instance 1, webappdb
, now gets its own service name that is the same as the db.instance
span metadata:
DB Instance 2, secondwebappdb
, now gets its own service name that is the same as the db.instance
span metadata:
Similarly on the service map, you would now see one web app making calls to two different Postgres databases.
dd.http.server.tag.query-string
Example with system property:
java -javaagent:/path/to/dd-java-agent.jar -Ddd.service=web-app -Ddd.env=dev -Ddd.http.server.tag.query-string=TRUE -jar path/to/application.jar
dd.trace.enabled
Example with system property and debug app mode:
java -javaagent:/path/to/dd-java-agent.jar -Ddd.trace.enabled=false -Ddatadog.slf4j.simpleLogger.defaultLogLevel=debug -jar path/to/application.jar
Debug app logs show that Tracing is disabled, not installing instrumentations.
dd.jmxfetch.config.dir
and dd.jmxfetch.config
Example configuration:
DD_JMXFETCH_CONFIG_DIR=<DIRECTORY_PATH>
+ DD_JMXFETCH_CONFIG=conf.yaml
DD_JMXFETCH_CONFIG=<DIRECTORY_PATH>/conf.yaml
With the following content for conf.yaml
:
init_config:
instances:
- jvm_direct: true
port: '<PORT>'
conf:
- include:
bean:
- java.lang:type=MemoryPool,name=Metaspace
attribute:
Usage.used:
metric_type: gauge
alias: sb.usage.used
Would produce the following result:
See the Java integration documentation to learn more about Java metrics collection with JMX fetch.
These extraction and injection settings have been deprecated in favor of the dd.trace.propagation.style.inject
, dd.trace.propagation.style.extract
, and dd.trace.propagation.style
settings since version 1.9.0. See Propagating Java Trace Context. The previous b3
setting for both B3 multi header and B3 single header has been replaced with the new settings b3multi
and b3single
.
dd.propagation.style.inject
DD_PROPAGATION_STYLE_INJECT
datadog
dd.propagation.style.extract
DD_PROPAGATION_STYLE_EXTRACT
datadog