@@ -338,10 +338,19 @@ class DistributedTracingSamplerSettings(Settings):
338338
339339
340340class DistributedTracingSamplerFullGranularitySettings (Settings ):
341+ _root = "default"
341342 _remote_parent_sampled = "default"
342343 _remote_parent_not_sampled = "default"
343344
344345
346+ class DistributedTracingSamplerFullGranularityRootSettings :
347+ pass
348+
349+
350+ class DistributedTracingSamplerFullGranularityRootAdaptiveSettings :
351+ pass
352+
353+
345354class DistributedTracingSamplerFullGranularityRemoteParentSampledSettings :
346355 pass
347356
@@ -359,10 +368,19 @@ class DistributedTracingSamplerFullGranularityRemoteParentNotSampledAdaptiveSett
359368
360369
361370class DistributedTracingSamplerPartialGranularitySettings (Settings ):
371+ _root = "default"
362372 _remote_parent_sampled = "default"
363373 _remote_parent_not_sampled = "default"
364374
365375
376+ class DistributedTracingSamplerPartialGranularityRootSettings :
377+ pass
378+
379+
380+ class DistributedTracingSamplerPartialGranularityRootAdaptiveSettings :
381+ pass
382+
383+
366384class DistributedTracingSamplerPartialGranularityRemoteParentSampledSettings :
367385 pass
368386
@@ -550,6 +568,10 @@ class EventHarvestConfigHarvestLimitSettings(Settings):
550568_settings .distributed_tracing = DistributedTracingSettings ()
551569_settings .distributed_tracing .sampler = DistributedTracingSamplerSettings ()
552570_settings .distributed_tracing .sampler .full_granularity = DistributedTracingSamplerFullGranularitySettings ()
571+ _settings .distributed_tracing .sampler .full_granularity .root = DistributedTracingSamplerFullGranularityRootSettings ()
572+ _settings .distributed_tracing .sampler .full_granularity .root .adaptive = (
573+ DistributedTracingSamplerFullGranularityRootAdaptiveSettings ()
574+ )
553575_settings .distributed_tracing .sampler .full_granularity .remote_parent_sampled = (
554576 DistributedTracingSamplerFullGranularityRemoteParentSampledSettings ()
555577)
@@ -563,6 +585,12 @@ class EventHarvestConfigHarvestLimitSettings(Settings):
563585 DistributedTracingSamplerFullGranularityRemoteParentNotSampledAdaptiveSettings ()
564586)
565587_settings .distributed_tracing .sampler .partial_granularity = DistributedTracingSamplerPartialGranularitySettings ()
588+ _settings .distributed_tracing .sampler .partial_granularity .root = (
589+ DistributedTracingSamplerPartialGranularityRootSettings ()
590+ )
591+ _settings .distributed_tracing .sampler .partial_granularity .root .adaptive = (
592+ DistributedTracingSamplerPartialGranularityRootAdaptiveSettings ()
593+ )
566594_settings .distributed_tracing .sampler .partial_granularity .remote_parent_sampled = (
567595 DistributedTracingSamplerPartialGranularityRemoteParentSampledSettings ()
568596)
@@ -918,6 +946,14 @@ def default_otlp_host(host):
918946_settings .distributed_tracing .sampler .full_granularity .enabled = _environ_as_bool (
919947 "NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_FULL_GRANULARITY_ENABLED" , default = True
920948)
949+ _settings .distributed_tracing .sampler .full_granularity ._root = (
950+ "adaptive"
951+ if os .environ .get ("NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_FULL_GRANULARITY_ROOT_ADAPTIVE_SAMPLING_TARGET" , None )
952+ else None
953+ ) or os .environ .get ("NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_FULL_GRANULARITY_ROOT" , "default" )
954+ _settings .distributed_tracing .sampler .full_granularity .root .adaptive .sampling_target = _environ_as_int (
955+ "NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_FULL_GRANULARITY_ROOT_ADAPTIVE_SAMPLING_TARGET" , None
956+ )
921957_settings .distributed_tracing .sampler .full_granularity ._remote_parent_sampled = (
922958 (
923959 "adaptive"
@@ -957,6 +993,14 @@ def default_otlp_host(host):
957993_settings .distributed_tracing .sampler .partial_granularity .type = os .environ .get (
958994 "NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_PARTIAL_GRANULARITY_TYPE" , "essential"
959995)
996+ _settings .distributed_tracing .sampler .partial_granularity ._root = (
997+ "adaptive"
998+ if os .environ .get ("NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_PARTIAL_GRANULARITY_ROOT_ADAPTIVE_SAMPLING_TARGET" , None )
999+ else None
1000+ ) or os .environ .get ("NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_PARTIAL_GRANULARITY_ROOT" , "default" )
1001+ _settings .distributed_tracing .sampler .partial_granularity .root .adaptive .sampling_target = _environ_as_int (
1002+ "NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_PARTIAL_GRANULARITY_ROOT_ADAPTIVE_SAMPLING_TARGET" , None
1003+ )
9601004_settings .distributed_tracing .sampler .partial_granularity ._remote_parent_sampled = (
9611005 "adaptive"
9621006 if os .environ .get (
0 commit comments