@@ -66,8 +66,7 @@ public static IHostBuilder AddApm(this IHostBuilder builder, ApmConfig config)
66
66
}
67
67
68
68
// 404s should not be error
69
- int ? httpStatus = activity . GetTagItem ( "http.status_code" ) as int ? ;
70
- if ( httpStatus . HasValue && httpStatus . Value == 404 )
69
+ if ( activity . GetTagItem ( "http.status_code" ) is 404 )
71
70
activity . SetStatus ( Status . Unset ) ;
72
71
} ;
73
72
} ) ;
@@ -197,10 +196,10 @@ public static TracerProviderBuilder AddFilteredOtlpExporter(this TracerProviderB
197
196
198
197
if ( builder is IDeferredTracerProviderBuilder deferredTracerProviderBuilder )
199
198
{
200
- return deferredTracerProviderBuilder . Configure ( ( sp , builder ) =>
199
+ return deferredTracerProviderBuilder . Configure ( ( sp , providerBuilder ) =>
201
200
{
202
201
var oltpOptions = sp . GetService < IOptions < FilteredOtlpExporterOptions > > ( ) ? . Value ?? new FilteredOtlpExporterOptions ( ) ;
203
- AddFilteredOtlpExporter ( builder , oltpOptions , configure , sp ) ;
202
+ AddFilteredOtlpExporter ( providerBuilder , oltpOptions , configure , sp ) ;
204
203
} ) ;
205
204
}
206
205
@@ -228,17 +227,14 @@ internal static TracerProviderBuilder AddFilteredOtlpExporter(
228
227
{
229
228
return builder . AddProcessor ( new CustomFilterProcessor ( new SimpleActivityExportProcessor ( otlpExporter ) , exporterOptions . Filter ) ) ;
230
229
}
231
- else
232
- {
233
- var batchOptions = exporterOptions . BatchExportProcessorOptions ?? new ( ) ;
234
-
235
- return builder . AddProcessor ( new CustomFilterProcessor ( new BatchActivityExportProcessor (
236
- otlpExporter ,
237
- batchOptions . MaxQueueSize ,
238
- batchOptions . ScheduledDelayMilliseconds ,
239
- batchOptions . ExporterTimeoutMilliseconds ,
240
- batchOptions . MaxExportBatchSize ) , exporterOptions . Filter ) ) ;
241
- }
230
+
231
+ var batchOptions = exporterOptions . BatchExportProcessorOptions ?? new ( ) ;
232
+ return builder . AddProcessor ( new CustomFilterProcessor ( new BatchActivityExportProcessor (
233
+ otlpExporter ,
234
+ batchOptions . MaxQueueSize ,
235
+ batchOptions . ScheduledDelayMilliseconds ,
236
+ batchOptions . ExporterTimeoutMilliseconds ,
237
+ batchOptions . MaxExportBatchSize ) , exporterOptions . Filter ) ) ;
242
238
}
243
239
244
240
public static void TryEnableIHttpClientFactoryIntegration ( this OtlpExporterOptions options , IServiceProvider ? serviceProvider , string httpClientName )
0 commit comments