Replies: 2 comments 1 reply
-
Hmm, this is the first I've taken a look at the example you reference. Personally, I don't think a processor is a great solution for doing this. I'd be more inclined to write my own exporter that does the filtering. For example, you could write an exporter that wrapped the OTLP exporter. Your exporter would do the filtering and forward to the underlying exporter. Regarding |
Beta Was this translation helpful? Give feedback.
-
@hadashiA This was recently fixed in #3368. The example needed to be updated as well. https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/extending-the-sdk/MyFilteringProcessor.cs |
Beta Was this translation helpful? Give feedback.
-
I would like to filter Tracing based on Activity instance.
I have looked here and attempted to create a filter processor for Tracing.
https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/extending-the-sdk/README.md#filtering-processor
However, I have two problems.
SetParentProvider
ofSimpleActivityExportProcessor
will not be called. So Exporter will not reference ResourceBuilder.new MyFilteringProcessor( new SimpleActivityExportProcessor(new MyExporter("ExporterX"))
opentelemetry-dotnet/src/OpenTelemetry/Trace/TracerProviderSdk.cs
Line 264 in 2a97920
AddOtlpExporter
like extension methods has a hard-coded ExportProcessor, it is not possible to insert a Processor without re-implementing the entire extension method itself.I am particularly troubled by 1. Can anyone tell me a good way to add a filter? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions