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

# AL0061 - Activity/Span missing semantic convention attributes

> Spans should include semantic convention attributes for observability

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

## Description

Activities (spans) should include OpenTelemetry semantic convention attributes to ensure consistent observability across services.

## Bad Code

```csharp theme={null}
using var activity = source.StartActivity("ProcessOrder");
activity?.SetTag("order", orderId); // non-standard attribute name
```

## Good Code

```csharp theme={null}
using var activity = source.StartActivity("ProcessOrder");
activity?.SetTag("enduser.id", userId);
activity?.SetTag("order.id", orderId);
```

## Properties

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

## Configuration

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