File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 99using Microsoft . Extensions . DependencyInjection ;
1010using Microsoft . Extensions . Hosting ;
1111using Microsoft . Extensions . Logging ;
12+
13+ #if DEBUG
1214using OpenTelemetry ;
1315using OpenTelemetry . Resources ;
1416using OpenTelemetry . Trace ;
17+ #endif
18+
1519using RootCommand = Aspire . Cli . Commands . RootCommand ;
1620
1721namespace Aspire . Cli ;
@@ -32,6 +36,7 @@ private static IHost BuildApplication(string[] args)
3236 logging . IncludeScopes = true ;
3337 } ) ;
3438
39+ #if DEBUG
3540 var otelBuilder = builder . Services
3641 . AddOpenTelemetry ( )
3742 . WithTracing ( tracing => {
@@ -56,6 +61,7 @@ private static IHost BuildApplication(string[] args)
5661 // has to finish sending telemetry.
5762 otelBuilder . UseOtlpExporter ( ) ;
5863 }
64+ #endif
5965
6066 var debugMode = args ? . Any ( a => a == "--debug" || a == "-d" ) ?? false ;
6167
You can’t perform that action at this time.
0 commit comments