@@ -144,22 +144,22 @@ public static IHostBuilder UseOpenTelemeter(this IHostBuilder builder, string ve
144144 Assembly entryAssembly = Assembly . GetEntryAssembly ( ) ;
145145 string entryAssemblyName = entryAssembly ? . GetName ( ) . Name ;
146146 services . AddOpenTelemetry ( )
147- . WithTracing ( builder =>
148- {
149- builder
150- . SetSampler ( new AlwaysOnSampler ( ) )
151- . SetResourceBuilder ( ResourceBuilder . CreateDefault ( ) . AddService ( entryAssemblyName , serviceVersion : versionString ) )
152- . AddSource ( ActivitySourceProvider . ActivitySourceName ) // Register your custom ActivitySource
153- //.AddConsoleExporter() // Export traces to console
154- . AddProcessor ( new ActivitySourceProvider . ActivityFilteringProcessor ( ) )
155- . AddHttpClientInstrumentation ( )
156- . SetErrorStatusOnException ( )
157- . AddAzureMonitorTraceExporter ( options =>
158- {
159- options . ConnectionString = ActivitySourceProvider . GetConnectionString ( ) ;
160-
161- } ) ;
162- } )
147+ // .WithTracing(builder =>
148+ // {
149+ // builder
150+ // .SetSampler(new AlwaysOnSampler())
151+ // .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(entryAssemblyName, serviceVersion: versionString))
152+ // .AddSource(ActivitySourceProvider.ActivitySourceName) // Register your custom ActivitySource
153+ // //.AddConsoleExporter() // Export traces to console
154+ // .AddProcessor(new ActivitySourceProvider.ActivityFilteringProcessor())
155+ // .AddHttpClientInstrumentation()
156+ // .SetErrorStatusOnException()
157+ // .AddAzureMonitorTraceExporter(options =>
158+ // {
159+ // options.ConnectionString = ActivitySourceProvider.GetConnectionString();
160+
161+ // });
162+ // })
163163 . WithMetrics ( builder =>
164164 {
165165 builder
@@ -175,17 +175,17 @@ public static IHostBuilder UseOpenTelemeter(this IHostBuilder builder, string ve
175175 options . ConnectionString = ActivitySourceProvider . GetConnectionString ( ) ;
176176 } ) ;
177177 } ) ;
178- services . AddLogging ( loggingBuilder =>
179- {
180- loggingBuilder . AddOpenTelemetry ( options =>
181- {
182- //options.AddConsoleExporter();
183- options . AddAzureMonitorLogExporter ( config =>
184- {
185- config . ConnectionString = ActivitySourceProvider . GetConnectionString ( ) ;
186- } ) ;
187- } ) ;
188- } ) ;
178+ // services.AddLogging(loggingBuilder =>
179+ // {
180+ // loggingBuilder.AddOpenTelemetry(options =>
181+ // {
182+ // //options.AddConsoleExporter();
183+ // options.AddAzureMonitorLogExporter(config =>
184+ // {
185+ // config.ConnectionString = ActivitySourceProvider.GetConnectionString();
186+ // });
187+ // });
188+ // });
189189 services . AddSingleton ( sp => ActivitySourceProvider . GetActivitySource ( ) ) ;
190190 } ) ;
191191
0 commit comments