diff --git a/src/OpenTelemetry/Trace/TracerProviderSdk.cs b/src/OpenTelemetry/Trace/TracerProviderSdk.cs index 240e8d7c3ba..5769459d946 100644 --- a/src/OpenTelemetry/Trace/TracerProviderSdk.cs +++ b/src/OpenTelemetry/Trace/TracerProviderSdk.cs @@ -56,7 +56,6 @@ internal TracerProviderSdk( { this.legacyActivityWildcardMode = true; this.legacyActivityWildcardModeRegex = GetWildcardRegex(legacyActivityOperationNames.Keys); - break; } } @@ -242,10 +241,8 @@ bool ShouldListenToLegacyActivity(Activity activity) { return this.legacyActivityWildcardModeRegex.IsMatch(activity.OperationName); } - else - { - return legacyActivityOperationNames.ContainsKey(activity.OperationName); - } + + return legacyActivityOperationNames.ContainsKey(activity.OperationName); } }