Filter OpenTelemetry tracing events

We have migrated our logging to use OpenTelemetry with an exporter to AppInsights.

We add the NServiceBus with AddSource(NServiceBus.*”) according to this documenation: Connecting OpenTelemetry traces and logs • NServiceBus Samples • Particular Docs

We can see logs in in our Log Analytics Workspace, but I am a bit annoyed with two trace logs that seems to be emited on each handled message. It is “Start dispatching” and “Finished dispatching”. These doesn’t give us much value and since we pay for log ingestion I would like to remove this.

I am looking for ways to filter these but have not yet found how.

Also, what value does these traces bring? It feels more like a log thing than a event?

Hi,
Thanks for raising this - the team is investigating.
In the meantime, I wonder if setting up a DCR with an ingestion-time transformation would be an option? In theory would drop those records before they hit the workspace:
source | where Message !in (“Start dispatching”, “Finished dispatching”)

Setup guide: https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/data-collection-transformations-workspace

Thanks, did not know about DCR so will definitly look into that alterantive.

I ended up implementing our own ActivitySource and created Activities heavily inspired by the ActivityFactory in NServiceBus.OpenTelelmetry.Tracing. It was not too complicated since it is so easy to hook into the different pipeline steps in NServiceBus. It also made it easier to customize the tracing for our need. However, I am still not 100% comfortable to have a custom implementation that might diverge with any evenutual future changes in NServiceBus.

The plus side to do it ourself is that it force us to think about the tracing at a higher level. What is it and how can we use it for other parts of the system.

The downside is that we need to follow how NServiceBus implements OpenTelemetry tracing in the future