From 5f047d4e4ada73a7a8ca0e62e258ad00733d3443 Mon Sep 17 00:00:00 2001 From: genteure Date: Fri, 5 Jul 2024 18:24:08 +0800 Subject: [PATCH] feat(cli): disable distributed context propagation --- BililiveRecorder.Cli/Program.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BililiveRecorder.Cli/Program.cs b/BililiveRecorder.Cli/Program.cs index 498cf9f..532c942 100644 --- a/BililiveRecorder.Cli/Program.cs +++ b/BililiveRecorder.Cli/Program.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.CommandLine; using System.CommandLine.NamingConventionBinder; +using System.Diagnostics; using System.IO; using System.Linq; using System.Net; @@ -44,6 +45,10 @@ namespace BililiveRecorder.Cli { ConsoleModeHelper.SetQuickEditMode(false); } + + DistributedContextPropagator.Current = DistributedContextPropagator.CreateNoOutputPropagator(); + AppContext.SetSwitch("System.Net.Http.EnableActivityPropagation", false); + RootCommand root; using (var entrypointLogger = BuildLogger(LogEventLevel.Fatal, LogEventLevel.Verbose))