> ## 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.

# AL0107 - Orphaned [TracedTag] attribute

> [TracedTag] on a parameter has no effect without [Traced] on the method or class

Source: [Al0107OrphanedTracedTagAnalyzer.cs](https://github.com/ANcpLua/ANcpLua.Analyzers/blob/main/src/ANcpLua.Analyzers/Analyzers/Al0107OrphanedTracedTagAnalyzer.cs)

## Description

`[TracedTag]` marks a parameter to be recorded as a span tag during instrumentation. Without `[Traced]` on the method or its declaring class, no span is created and the tag is silently ignored.

## Bad Code

```csharp theme={null}
public class OrderService
{
    // No [Traced] on method or class — tag is orphaned
    public void Process([TracedTag] string orderId) { }
}
```

## Good Code

```csharp theme={null}
[Traced("MyApp")]
public class OrderService
{
    public void Process([TracedTag] string orderId) { }
}
```

## Properties

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

## Configuration

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