Table of Contents

Class Meters

Namespace
JD.AI.Telemetry
Assembly
JD.AI.Telemetry.dll

Central Meter and instrument definitions for JD.AI metrics. All counters and histograms follow the jdai.* naming convention and use the emerging OpenTelemetry GenAI semantic conventions where applicable.

public static class Meters
Inheritance
Meters
Inherited Members

Fields

AgentMeterName

Meter name for agent-level metrics.

public const string AgentMeterName = "JD.AI.Agent"

Field Value

string

AllMeterNames

All meter names — pass to .AddMeter() when configuring OTel.

public static readonly string[] AllMeterNames

Field Value

string[]

CircuitBreakerTrips

Number of circuit breaker trips.

public static readonly Counter<long> CircuitBreakerTrips

Field Value

Counter<long>

GenAiInputTokens

Input (prompt) tokens consumed per LLM call.

public static readonly Counter<long> GenAiInputTokens

Field Value

Counter<long>

GenAiMeterName

Meter name for Gen AI metrics (follows OTel GenAI semconv).

public const string GenAiMeterName = "JD.AI.GenAI"

Field Value

string

GenAiOperationDuration

Duration of Gen AI client operations in seconds.

public static readonly Histogram<double> GenAiOperationDuration

Field Value

Histogram<double>

GenAiOutputTokens

Output (completion) tokens generated per LLM call.

public static readonly Counter<long> GenAiOutputTokens

Field Value

Counter<long>

LoopDetections

Number of loop detection events (warnings and hard-stops).

public static readonly Counter<long> LoopDetections

Field Value

Counter<long>

ProviderErrors

Number of provider errors (non-transient or after exhausting retries).

public static readonly Counter<long> ProviderErrors

Field Value

Counter<long>

ProviderLatency

Provider API call latency in milliseconds.

public static readonly Histogram<double> ProviderLatency

Field Value

Histogram<double>

TokensUsed

Total tokens consumed across all providers (prompt + completion).

public static readonly Counter<long> TokensUsed

Field Value

Counter<long>

ToolCalls

Number of tool invocations, broken down by tool name.

public static readonly Counter<long> ToolCalls

Field Value

Counter<long>

TurnCount

Total number of agent turns completed.

public static readonly Counter<long> TurnCount

Field Value

Counter<long>

TurnDuration

Wall-clock duration of each agent turn in milliseconds.

public static readonly Histogram<double> TurnDuration

Field Value

Histogram<double>