Steve Gordon 9/18/2024

Disabling Recording of an Activity (span) in .NET OpenTelemetry Instrumentation

Read Original

This technical article details a method for conditionally disabling the recording and export of an Activity (span) in .NET's OpenTelemetry-compatible instrumentation. It addresses a specific use case in ASP.NET Core middleware where, for performance or cost reasons, you might want to programmatically prevent certain spans (like those from a known callback URL) from being sampled and exported, even within a sampled trace.

Disabling Recording of an Activity (span) in .NET OpenTelemetry Instrumentation

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week