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

# AL0069 - ServiceDefaults configuration incomplete

> ServiceDefaults should include tracing, metrics, and logging

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

## Description

ServiceDefaults configuration should include all three observability pillars: tracing, metrics, and logging. Missing any one reduces observability coverage.

## Bad Code

```csharp theme={null}
builder.Services.AddOpenTelemetry()
    .WithTracing(t => t.AddAspNetCoreInstrumentation());
// Missing WithMetrics and logging configuration
```

## Good Code

```csharp theme={null}
builder.Services.AddOpenTelemetry()
    .WithTracing(t => t.AddAspNetCoreInstrumentation())
    .WithMetrics(m => m.AddAspNetCoreInstrumentation());
builder.Logging.AddOpenTelemetry();
```

## Properties

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

## Configuration

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