Skip to content

Commit 9f4ddfc

Browse files
author
elsa
committed
fix: init storage before telemetry init
* src/datadog/tracer.cpp
1 parent 2d8c4bd commit 9f4ddfc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/datadog/tracer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ Tracer::Tracer(const FinalizedTracerConfig& config,
6161
baggage_injection_enabled_(false),
6262
baggage_extraction_enabled_(false),
6363
correlate_full_host_profiles_(config.correlate_full_host_profiles) {
64+
#ifdef __linux__
65+
// TODO: change the way this is done to handle programs that fork.
66+
if (correlate_full_host_profiles_)
67+
signature_.generate_process_correlation_storage();
68+
#endif
69+
6470
telemetry::init(config.telemetry, logger_, config.http_client,
6571
config.event_scheduler, config.agent_url);
6672
if (config.report_hostname) {
@@ -94,12 +100,6 @@ Tracer::Tracer(const FinalizedTracerConfig& config,
94100
}
95101
}
96102

97-
#ifdef __linux__
98-
// TODO: change the way this is done to handle programs that fork.
99-
if (correlate_full_host_profiles_)
100-
signature_.generate_process_correlation_storage();
101-
#endif
102-
103103
if (config.log_on_startup) {
104104
logger_->log_startup([configuration = this->config()](std::ostream& log) {
105105
log << "DATADOG TRACER CONFIGURATION - " << configuration;

0 commit comments

Comments
 (0)