@@ -323,6 +323,8 @@ class SpanEventAttributesSettings(Settings):
323323class DistributedTracingSettings (Settings ):
324324 pass
325325
326+ class DistributedTracingSamplerSettings (Settings ):
327+ pass
326328
327329class ServerlessModeSettings (Settings ):
328330 pass
@@ -493,6 +495,7 @@ class EventHarvestConfigHarvestLimitSettings(Settings):
493495_settings .datastore_tracer .instance_reporting = DatastoreTracerInstanceReportingSettings ()
494496_settings .debug = DebugSettings ()
495497_settings .distributed_tracing = DistributedTracingSettings ()
498+ _settings .distributed_tracing .sampler = DistributedTracingSamplerSettings ()
496499_settings .error_collector = ErrorCollectorSettings ()
497500_settings .error_collector .attributes = ErrorCollectorAttributesSettings ()
498501_settings .event_harvest_config = EventHarvestConfigSettings ()
@@ -814,6 +817,8 @@ def default_otlp_host(host):
814817_settings .ml_insights_events .enabled = False
815818
816819_settings .distributed_tracing .enabled = _environ_as_bool ("NEW_RELIC_DISTRIBUTED_TRACING_ENABLED" , default = True )
820+ _settings .distributed_tracing .sampler .remote_parent_sampled = os .environ .get ("NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_REMOTE_PARENT_SAMPLED" , 'default' )
821+ _settings .distributed_tracing .sampler .remote_parent_not_sampled = os .environ .get ("NEW_RELIC_DISTRIBUTED_TRACING_SAMPLER_REMOTE_PARENT_NOT_SAMPLED" , 'default' )
817822_settings .distributed_tracing .exclude_newrelic_header = False
818823_settings .span_events .enabled = _environ_as_bool ("NEW_RELIC_SPAN_EVENTS_ENABLED" , default = True )
819824_settings .span_events .attributes .enabled = True
0 commit comments