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