Skip to main content
Source: Al0109NonInterceptableTracedAnalyzer.cs

Description

The source generator that implements [Traced] instrumentation works by intercepting method calls. Abstract methods, extern methods, and partial definition methods cannot be intercepted, so [Traced] on them has no effect.

Bad Code

Good Code

Properties

  • Category: OpenTelemetry
  • Severity: Warning
  • Enabled by default: True
  • Code fix available: True

Configuration