Skip to content

Commit 423e028

Browse files
committed
Add core_tracing.drop_inprocess_spans setting
1 parent 8e7cb4c commit 423e028

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

newrelic/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ def _process_configuration(section):
399399
_process_setting(section, "ml_insights_events.enabled", "getboolean", None)
400400
_process_setting(section, "distributed_tracing.enabled", "getboolean", None)
401401
_process_setting(section, "distributed_tracing.exclude_newrelic_header", "getboolean", None)
402+
_process_setting(section, "core_tracing.drop_inprocess_spans", "getboolean", None)
402403
_process_setting(section, "span_events.enabled", "getboolean", None)
403404
_process_setting(section, "span_events.max_samples_stored", "getint", None)
404405
_process_setting(section, "span_events.attributes.enabled", "getboolean", None)

newrelic/core/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ class DistributedTracingSettings(Settings):
324324
pass
325325

326326

327+
class CoreTracingSettings(Settings):
328+
pass
329+
330+
327331
class ServerlessModeSettings(Settings):
328332
pass
329333

@@ -493,6 +497,7 @@ class EventHarvestConfigHarvestLimitSettings(Settings):
493497
_settings.datastore_tracer.instance_reporting = DatastoreTracerInstanceReportingSettings()
494498
_settings.debug = DebugSettings()
495499
_settings.distributed_tracing = DistributedTracingSettings()
500+
_settings.core_tracing = CoreTracingSettings()
496501
_settings.error_collector = ErrorCollectorSettings()
497502
_settings.error_collector.attributes = ErrorCollectorAttributesSettings()
498503
_settings.event_harvest_config = EventHarvestConfigSettings()
@@ -814,6 +819,7 @@ def default_otlp_host(host):
814819
_settings.ml_insights_events.enabled = False
815820

816821
_settings.distributed_tracing.enabled = _environ_as_bool("NEW_RELIC_DISTRIBUTED_TRACING_ENABLED", default=True)
822+
_settings.core_tracing.drop_inprocess_spans = _environ_as_bool("NEW_RELIC_CORE_TRACING_DROP_INPROCESS_SPANS", default=False)
817823
_settings.distributed_tracing.exclude_newrelic_header = False
818824
_settings.span_events.enabled = _environ_as_bool("NEW_RELIC_SPAN_EVENTS_ENABLED", default=True)
819825
_settings.span_events.attributes.enabled = True

0 commit comments

Comments
 (0)