@@ -111,25 +111,16 @@ private static void OnConfigurationChanged(
111111 telemetry ,
112112 errorLog ) ;
113113
114+ TracerSettings newSettings ;
114115 if ( currentSettings . Equals ( newMutableSettings ) )
115116 {
116117 Log . Debug ( "No changes detected in the new dynamic configuration" ) ;
117118 // Even though there were no "real" changes, there may be _effective_ changes in telemetry that
118119 // need to be recorded (e.g. the customer set the value in code but it was already set via
119120 // env vars). We _should_ record exporter settings too, but that introduces a bunch of complexity
120121 // which we'll resolve later anyway, so just have that gap for now (it's very niche).
121- // If there are changes, they're recorded automatically in ConfigureInternal
122+ // If there are changes, they're recorded automatically in Tracer.Configure()
122123 telemetry . CopyTo ( TelemetryFactory . Config ) ;
123- return ;
124- }
125-
126- // Needs to be done before returning, to feed the value to the telemetry
127- // var debugLogsEnabled = settings.WithKeys(ConfigurationKeys.DebugEnabled).AsBool();
128-
129- TracerSettings newSettings ;
130- if ( currentSettings . Equals ( newMutableSettings ) )
131- {
132- Log . Debug ( "No changes detected in the new dynamic configuration" ) ;
133124 newSettings = tracerSettings ;
134125 }
135126 else
@@ -151,10 +142,8 @@ private static void OnConfigurationChanged(
151142 Tracer . Configure ( newSettings ) ;
152143 }
153144
154- // TODO: This should be refactored as it likely doesn't record the config in the correct order
155- // We could either take a similar MutableSettings approach, or alternatively, ensure that
156- // DebuggerManager.Instance.UpdateConfiguration explicitly records the configuration values itself
157- // instead of writing them to TelemetryFactory.Config
145+ // TODO: This might not record the config in the correct order in future, but would require
146+ // a big refactoring of debugger settings to resolve
158147 var settings = new ConfigurationBuilder ( dynamicConfig , TelemetryFactory . Config ) ;
159148 var dynamicDebuggerSettings = new ImmutableDynamicDebuggerSettings
160149 {
0 commit comments