Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions include/datadog/tracer_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ struct TracerConfig {
// specify the same `runtime_id` for all tracer instances in the same run.
Optional<RuntimeID> runtime_id;

// Root session ID for stable telemetry correlation across forked workers.
// Integrations (nginx, httpd, kong) should set this in the master process
// before workers fork so all Tracers share the same root.
Optional<std::string> root_session_id;

// `integration_name` is the name of the product integrating this library.
// Example: "nginx", "envoy" or "istio".
Optional<std::string> integration_name;
Expand Down Expand Up @@ -189,11 +194,6 @@ struct TracerConfig {
// This option is ignored if `resource_renaming_enabled` is not `true`.
Optional<bool> resource_renaming_always_simplified_endpoint;

// Root session ID for stable telemetry correlation across forked workers.
// Integrations (nginx, httpd, kong) should set this in the master process
// before workers fork so all Tracers share the same root.
Optional<std::string> root_session_id;

/// A mapping of process-specific tags used to uniquely identify processes.
///
/// The `process_tags` map allows associating arbitrary string-based keys and
Expand Down
4 changes: 2 additions & 2 deletions src/datadog/tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ Tracer::Tracer(const FinalizedTracerConfig& config,
: logger_(config.logger),
runtime_id_(config.runtime_id ? *config.runtime_id
: RuntimeID::generate()),
signature_{runtime_id_,
signature_(runtime_id_,
root_session_id::get_or_init(
config.root_session_id.value_or(runtime_id_.string())),
config.defaults.service, config.defaults.environment},
config.defaults.service, config.defaults.environment),
config_manager_(std::make_shared<ConfigManager>(config)),
collector_(/* see constructor body */),
span_sampler_(
Expand Down