- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
ddtrace
gem v1.x. If you are using the datadog
gem v2.0 or later, see the latest Propagating Ruby Trace Context documentation.Datadog APM tracer supports B3 and W3C Trace Context header extraction and injection for distributed tracing.
Distributed headers injection and extraction is controlled by configuring injection and extraction styles. The following styles are supported:
datadog
b3multi
b3
tracecontext
none
Injection styles can be configured using:
DD_TRACE_PROPAGATION_STYLE_INJECT=datadog,b3
The value of the environment variable is a comma-separated list of header styles that are enabled for injection. The default setting is datadog,tracecontext
.
Extraction styles can be configured using:
DD_TRACE_PROPAGATION_STYLE_EXTRACT=datadog,b3
The value of the environment variable is a comma-separated list of header styles that are enabled for extraction. The default setting is datadog,tracecontext
.
If multiple extraction styles are enabled extraction attempt is done on the order those styles are configured and first successful extracted value is used.
The default extraction styles are, in order, datadog
, b3multi
, b3
, and tracecontext
.
You can also enable or disable the use of these formats in code by using Datadog.configure
:
Datadog.configure do |c|
# List of header formats that should be extracted
c.tracing.distributed_tracing.propagation_extract_style = [ 'tracecontext', 'datadog', 'b3' ]
# List of header formats that should be injected
c.tracing.distributed_tracing.propagation_inject_style = [ 'tracecontext', 'datadog' ]
end
For more information about trace context propagation configuration, read the Distributed Tracing section in the Ruby Tracing Library Configuration docs.