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

# AL0110 - [TracedTag] on out/ref parameter

> out/ref parameters cannot be captured as span tags because their value is set after the call

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

## Description

`[TracedTag]` captures the parameter value as a span attribute at call time. For `out` and `ref` parameters, the value is not available until after the method executes, making the tag capture meaningless or incorrect.

## Bad Code

```csharp theme={null}
[Traced("MyApp")]
public bool TryParse(string input, [TracedTag] out int result)
{
    result = 0;
    return true;
}
```

## Good Code

```csharp theme={null}
[Traced("MyApp")]
public bool TryParse([TracedTag] string input, out int result)
{
    result = 0;
    return true;
}
```

## Properties

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

## Configuration

```editorconfig theme={null}
dotnet_diagnostic.AL0110.severity = error
```
