diff --git a/tracer/src/Datadog.Trace/Configuration/ConfigurationSources/CompositeConfigurationSource.cs b/tracer/src/Datadog.Trace/Configuration/ConfigurationSources/CompositeConfigurationSource.cs index 1df489f402f2..ec7ad7d3346f 100644 --- a/tracer/src/Datadog.Trace/Configuration/ConfigurationSources/CompositeConfigurationSource.cs +++ b/tracer/src/Datadog.Trace/Configuration/ConfigurationSources/CompositeConfigurationSource.cs @@ -35,6 +35,8 @@ public CompositeConfigurationSource(IEnumerable sources) _sources = [..sources]; } + private string JsonConfigurationSource { get; set; } = "N/A, from composite configuration source"; + /// /// Adds a new configuration source to this instance. /// @@ -44,6 +46,10 @@ public void Add(IConfigurationSource source) if (source == null) { ThrowHelper.ThrowArgumentNullException(nameof(source)); } _sources.Add(source); + if (source is JsonConfigurationSource) + { + JsonConfigurationSource = source.ToString(); + } } /// @@ -58,6 +64,11 @@ public void Insert(int index, IConfigurationSource item) _sources.Insert(index, item); } + public override string ToString() + { + return JsonConfigurationSource; + } + /// IEnumerator IEnumerable.GetEnumerator() => _sources.GetEnumerator();