# TraconDiagnostics

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.tracondiagnostics/
> Summary: TraconDiagnostics: Defines Tracon telemetry source and measurement names.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Core.dll</code></div>

Defines Tracon telemetry source and measurement names.

```csharp
public static class TraconDiagnostics
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.tracondiagnostics/">TraconDiagnostics</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

These names are **stable**. Consumers use them in OpenTelemetry
configuration, so changing them is a breaking change.

Consumers continue to configure their own OTLP exporter. Tracon does not
take over the pipeline. Example setup:

```csharp
builder.Services.AddOpenTelemetry()
    .WithTracing(t => t.AddSource(TraconDiagnostics.ActivitySourceName))
    .WithMetrics(m => m.AddMeter(TraconDiagnostics.MeterName));
```

## Fields

### <a id="Tracon_TraconDiagnostics_ActivitySourceName"></a> ActivitySourceName

Gets the Tracon `ActivitySource` name.

```csharp
public const string ActivitySourceName = "Tracon"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_AgentSourceFailureCounterName"></a> AgentSourceFailureCounterName

Gets the counter name for agent-source failures.

```csharp
public const string AgentSourceFailureCounterName = "tracon.agent_source.failures"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_AuditWriteFailureCounterName"></a> AuditWriteFailureCounterName

Gets the counter name for audit-trail entries that could not be written.

```csharp
public const string AuditWriteFailureCounterName = "tracon.audit.write_failures"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

#### Remarks

Counted on BOTH audit write paths and separated by [Tags.AuditOutcome](/api/tracon.tracondiagnostics.tags/#Tracon_TraconDiagnostics_Tags_AuditOutcome):
a `swallowed` failure left the operation to continue, a `refused` one
stopped it. A non-zero value on either means the audit trail has a hole in it.

### <a id="Tracon_TraconDiagnostics_CompactHistoryActivityName"></a> CompactHistoryActivityName

Gets the span name that represents a context-compaction summarization call.

```csharp
public const string CompactHistoryActivityName = "compact_history"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_JobCounterName"></a> JobCounterName

Gets the counter name for finished background jobs.

```csharp
public const string JobCounterName = "tracon.job.executions"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_JobDurationName"></a> JobDurationName

Gets the job-attempt duration histogram name in seconds.

```csharp
public const string JobDurationName = "tracon.job.duration"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_JobQueueDepthGaugeName"></a> JobQueueDepthGaugeName

Gets the observable gauge that shows outstanding jobs per lane and status.

```csharp
public const string JobQueueDepthGaugeName = "tracon.job.queue.depth"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_JudgeCostCounterName"></a> JudgeCostCounterName

Gets the counter name for the judge's own cost.

```csharp
public const string JudgeCostCounterName = "tracon.judge.cost"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_JudgeScoreHistogramName"></a> JudgeScoreHistogramName

Gets the histogram name for judge scores from 0 to 100.

```csharp
public const string JudgeScoreHistogramName = "tracon.judge.score"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_MeterName"></a> MeterName

Gets the Tracon `Meter` name.

```csharp
public const string MeterName = "Tracon"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_ModelCacheLookupCounterName"></a> ModelCacheLookupCounterName

Gets the response-cache lookup counter name.

```csharp
public const string ModelCacheLookupCounterName = "tracon.model.cache"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_QuotaLimitGaugeName"></a> QuotaLimitGaugeName

Gets the observable gauge that shows the configured quota-scope limit.

```csharp
public const string QuotaLimitGaugeName = "tracon.quota.limit"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_QuotaUsageGaugeName"></a> QuotaUsageGaugeName

Gets the observable gauge that shows quota-scope consumption in the current period.

```csharp
public const string QuotaUsageGaugeName = "tracon.quota.usage"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_RunActivityName"></a> RunActivityName

Gets the root span name that represents a run.

```csharp
public const string RunActivityName = "tracon.run"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_RunCostCounterName"></a> RunCostCounterName

Gets the monetary cost counter name per run.

```csharp
public const string RunCostCounterName = "tracon.run.cost"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_RunCounterName"></a> RunCounterName

Gets the completed-run counter name.

```csharp
public const string RunCounterName = "tracon.runs"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_RunDurationName"></a> RunDurationName

Gets the run-duration histogram name in seconds.

```csharp
public const string RunDurationName = "tracon.run.duration"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_RunRecordingFailureCounterName"></a> RunRecordingFailureCounterName

Gets the counter name for run records that could not be written.

```csharp
public const string RunRecordingFailureCounterName = "tracon.run.recording_failures"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

#### Remarks

Run recording is best-effort by design: a store failure never interrupts the
run. This counter is how that loss becomes visible. One measurement is one
write attempt whose record was lost, separated by
[Tags.RecordingStage](/api/tracon.tracondiagnostics.tags/#Tracon_TraconDiagnostics_Tags_RecordingStage). A non-zero value means a run happened whose
evidence is incomplete or missing.

### <a id="Tracon_TraconDiagnostics_SkillScriptActivityName"></a> SkillScriptActivityName

Gets the span name that represents a skill script execution.

```csharp
public const string SkillScriptActivityName = "execute_skill_script"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_SkillScriptToolName"></a> SkillScriptToolName

Gets the tool name for skill script calls in metrics.

```csharp
public const string SkillScriptToolName = "skill_script"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_TokenCounterName"></a> TokenCounterName

Gets the token counter name.

```csharp
public const string TokenCounterName = "tracon.tokens"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_ToolCounterName"></a> ToolCounterName

Gets the tool-invocation counter name.

```csharp
public const string ToolCounterName = "tracon.tool.invocations"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_TraconDiagnostics_ToolDurationName"></a> ToolDurationName

Gets the tool-call duration histogram name in seconds.

```csharp
public const string ToolDurationName = "tracon.tool.duration"
```

#### Field Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)
