> ## Documentation Index
> Fetch the complete documentation index at: https://ancplua.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AL0109 - Non-interceptable [Traced] method

> [Traced] on abstract, extern, or partial definition methods cannot be intercepted

Source: [Al0109NonInterceptableTracedAnalyzer.cs](https://github.com/ANcpLua/ANcpLua.Analyzers/blob/main/src/ANcpLua.Analyzers/Analyzers/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

```csharp theme={null}
public abstract class BaseService
{
    [Traced("MyApp")]
    public abstract void ProcessAsync();  // Cannot be intercepted
}
```

## Good Code

```csharp theme={null}
// Apply [Traced] at class level instead — concrete overrides get traced
[Traced("MyApp")]
public abstract class BaseService
{
    public abstract void ProcessAsync();
}
```

## Properties

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

## Configuration

```editorconfig theme={null}
dotnet_diagnostic.AL0109.severity = warning
```
