Configuring the C++ Tracing Library

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

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.

Environment variables

DD_AGENT_HOST
Version: v0.3.6
Default: localhost
Sets the host where traces are sent (the host running the Agent). Can be a hostname or an IP address. Ignored if DD_TRACE_AGENT_URL is set.
DD_TRACE_AGENT_PORT
Version: v0.3.6
Default: 8126
Sets the port where traces are sent (the port where the Agent is listening for connections). Ignored if DD_TRACE_AGENT_URL is set.
DD_TRACE_AGENT_URL
Version: v1.1.4
Sets the URL endpoint where traces are sent. Overrides DD_AGENT_HOST and DD_TRACE_AGENT_PORT if set. This URL supports http, https and unix address schemes.
DD_ENV
Version: v1.0.0
If specified, adds the env tag with the specified value to all generated spans.
DD_SERVICE
Version: v1.1.4
If specified, sets the default service name. Otherwise, the service name must be provided via TracerOptions or JSON configuration.
DD_TRACE_ANALYTICS_ENABLED
Version: v1.1.3
Default: false
Enable App Analytics globally for the application.
DD_TRACE_ANALYTICS_SAMPLE_RATE
Version: v1.1.3
Sets the App Analytics sampling rate. Overrides DD_TRACE_ANALYTICS_ENABLED if set. A floating point number between 0.0 and 1.0.
DD_TRACE_SAMPLING_RULES
Version: v1.1.4
Default: [{"sample_rate": 1.0}]
A JSON array of objects. Each object must have a “sample_rate”, and the “name” and “service” fields are optional. The “sample_rate” value must be between 0.0 and 1.0 (inclusive). Rules are applied in configured order to determine the trace’s sample rate.
DD_VERSION
Version: v1.1.4
If specified, adds the version tag with the specified value to all generated spans.
DD_TAGS
Version: v1.1.4
If specified, will add tags to all generated spans. A comma-separated list of key:value pairs.
DD_PROPAGATION_STYLE_INJECT
Version: v0.4.1
Default: Datadog
Propagation style(s) to use when injecting tracing headers. Datadog, B3, or Datadog B3.
DD_PROPAGATION_STYLE_EXTRACT
Version: v0.4.1
Default: Datadog
Propagation style(s) to use when extracting tracing headers. Datadog, B3, or Datadog B3.

Further Reading

Documentation, liens et articles supplémentaires utiles: