AL0013: Missing telemetry schema URL
Setting the schema URL allows collectors and backends to understand which version of semantic conventions your telemetry uses.
When it triggers
// AL0013: OpenTelemetry resource configuration should include 'telemetry.schema_url' attribute
builder.ConfigureResource(resource => resource
.AddService("MyService"));
Why this matters
The telemetry.schema_url attribute tells observability backends which version of OpenTelemetry semantic conventions your telemetry uses. Without it:
- Backends can't automatically transform attribute names
- Queries may break when conventions change
- Interoperability between services becomes harder
How to fix
Add the schema URL to your resource configuration:
builder.ConfigureResource(resource => resource
.AddService("MyService")
.AddAttributes(new Dictionary<string, object>
{
["telemetry.schema_url"] = "https://opentelemetry.io/schemas/1.21.0"
}));
Configuration
[*.cs]
dotnet_diagnostic.AL0013.severity = suggestion