Class Meters
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
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
GenAiInputTokens
Input (prompt) tokens consumed per LLM call.
public static readonly Counter<long> GenAiInputTokens
Field Value
GenAiMeterName
Meter name for Gen AI metrics (follows OTel GenAI semconv).
public const string GenAiMeterName = "JD.AI.GenAI"
Field Value
GenAiOperationDuration
Duration of Gen AI client operations in seconds.
public static readonly Histogram<double> GenAiOperationDuration
Field Value
GenAiOutputTokens
Output (completion) tokens generated per LLM call.
public static readonly Counter<long> GenAiOutputTokens
Field Value
LoopDetections
Number of loop detection events (warnings and hard-stops).
public static readonly Counter<long> LoopDetections
Field Value
ProviderErrors
Number of provider errors (non-transient or after exhausting retries).
public static readonly Counter<long> ProviderErrors
Field Value
ProviderLatency
Provider API call latency in milliseconds.
public static readonly Histogram<double> ProviderLatency
Field Value
TokensUsed
Total tokens consumed across all providers (prompt + completion).
public static readonly Counter<long> TokensUsed
Field Value
ToolCalls
Number of tool invocations, broken down by tool name.
public static readonly Counter<long> ToolCalls
Field Value
TurnCount
Total number of agent turns completed.
public static readonly Counter<long> TurnCount
Field Value
TurnDuration
Wall-clock duration of each agent turn in milliseconds.
public static readonly Histogram<double> TurnDuration