File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1566,6 +1566,30 @@ TEST_CASE("128-bit trace IDs") {
15661566 REQUIRE (*high == trace_id.high );
15671567}
15681568
1569+ TEST_CASE (" correlate full host profiles" ) {
1570+ TracerConfig config;
1571+ config.service = " testsvc" ;
1572+ config.collector = std::make_shared<NullCollector>();
1573+ config.logger = std::make_shared<NullLogger>();
1574+
1575+ SECTION (" is off by default" ) {
1576+ auto finalized_config = finalize_config (config);
1577+ REQUIRE (finalized_config);
1578+ Tracer tracer{*finalized_config};
1579+ REQUIRE (elastic_apm_profiling_correlation_process_storage_v1 == nullptr );
1580+ }
1581+
1582+ SECTION (" is available when enabled" ) {
1583+ config.correlate_full_host_profiles = true ;
1584+ auto finalized_config = finalize_config (config);
1585+ REQUIRE (finalized_config);
1586+ Tracer tracer{*finalized_config};
1587+ REQUIRE (elastic_apm_profiling_correlation_process_storage_v1 != nullptr );
1588+ auto span = tracer.create_span ();
1589+ REQUIRE (elastic_apm_profiling_correlation_tls_v1 != nullptr );
1590+ }
1591+ }
1592+
15691593TEST_CASE (
15701594 " _dd.p.tid invalid or inconsistent with trace ID results in error tag" ) {
15711595 struct TestCase {
You can’t perform that action at this time.
0 commit comments