AI Agent Metric Definition Document
Metric Category:
llm-clientEntity Category: System Service Covered Entity Models: Service / Service Instance
1. MCP Client Metrics
1.1 MCP Client Operation Duration
| Attribute | Description |
|---|---|
| Metric ID (Service Instance) | one.service.instance.mcp.client.operation.duration |
| Metric ID (Service) | one.service.mcp.client.operation.duration |
| Metric Name | MCP Client Operation Duration |
| Metric Type | Histogram |
| Display / Reporting Unit | seconds (s) |
| Decimal Places | 2 |
| Metric Source | OTEL Native Metric |
| Basic Judgment | Lower is better |
| Anomaly Type | Slowness |
| Related Entities | Service, Service Instance, Host (Instance Level); Service (Service Level) |
Description
The duration of the MCP request or notification observed by the sender, from the moment the message is sent until the response or acknowledgment is received.
Related Dimensions
| Dimension Field | Description |
|---|---|
mcp.method.name | MCP method name |
error.type | Error type |
gen_ai.prompt.name | Prompt name |
gen_ai.tool.name | Tool name |
rpc.response.status_code | RPC response status code |
gen_ai.operation.name | Operation type |
jsonrpc.protocol.version | JSON-RPC protocol version |
mcp.protocol.version | MCP protocol version |
network.protocol.name | Network protocol name |
network.protocol.version | Network protocol version |
network.transport | Transport protocol |
mcp.resource.uri | MCP Resource URI |
1.2 MCP Client Call Count
| Attribute | Description |
|---|---|
| Metric ID (Service Instance) | one.service.instance.mcp.client.call.count |
| Metric ID (Service) | one.service.mcp.client.call.count |
| Metric Name | MCP Client Call Count |
| Metric Type | SUM |
| Display / Reporting Unit | count |
| Decimal Places | 2 |
| Metric Source | ONE Platform Custom Metric |
| Basic Judgment | Higher is better |
| Anomaly Type | Throughput |
| Related Entities | Service, Service Instance, Host (Instance Level); Service (Service Level) |
Description
The number of requests initiated by the MCP client.
Related Dimensions
Same as 1.1 MCP Client Operation Duration.
2. Generative AI Client Metrics
2.1 Generative AI Token Usage
| Attribute | Description |
|---|---|
| Metric ID (Service Instance) | one.service.instance.gen_ai.client.token.usage |
| Metric ID (Service) | one.service.gen_ai.client.token.usage |
| Metric Name | Generative AI Token Usage |
| Metric Type | Histogram |
| Display / Reporting Unit | token |
| Decimal Places | 2 |
| Metric Source | Standard Metric |
| Basic Judgment | None |
| Anomaly Type | Resource |
| Related Entities | Service, Service Instance, Host (Instance Level); Service (Service Level) |
Description
Token consumption of AI tools.
Related Dimensions
| Dimension Field | Description |
|---|---|
gen_ai.operation.name | Operation type, e.g. chat / embeddings |
gen_ai.provider.name | AI provider, e.g. openai, anthropic |
gen_ai.token.type | Token type (input / output) |
gen_ai.request.model | Request model name |
2.2 Generative AI Client Operation Duration
| Attribute | Description |
|---|---|
| Metric ID (Service Instance) | one.service.instance.gen_ai.client.operation.duration |
| Metric ID (Service) | one.service.gen_ai.client.operation.duration |
| Metric Name | Generative AI Client Operation Duration |
| Metric Type | Histogram |
| Display / Reporting Unit | seconds (s) |
| Decimal Places | 2 |
| Metric Source | OTEL Native Metric |
| Basic Judgment | Lower is better |
| Anomaly Type | Slowness |
| Related Entities | Service, Service Instance, Host (Instance Level); Service (Service Level) |
Description
The total request time from client initiation to server response completion.
Related Dimensions
| Dimension Field | Description |
|---|---|
gen_ai.operation.name | Operation type |
gen_ai.provider.name | AI provider |
error.type | Error type |
gen_ai.request.model | Request model name |
2.3 Generative AI Client Call Count
| Attribute | Description |
|---|---|
| Metric ID (Service Instance) | one.service.instance.gen_ai.client.call.count |
| Metric ID (Service) | one.service.gen_ai.client.call.count |
| Metric Name | Generative AI Client Call Count |
| Metric Type | SUM |
| Display / Reporting Unit | count |
| Decimal Places | 2 |
| Metric Source | ONE Platform Custom Metric |
| Basic Judgment | Higher is better |
| Anomaly Type | Throughput |
| Related Entities | Service, Service Instance, Host (Instance Level); Service (Service Level) |
Description
The number of large model invocations initiated by the client.
Related Dimensions (Service Instance Level)
| Dimension Field | Description |
|---|---|
gen_ai.operation.name | Operation type |
gen_ai.provider.name | AI provider |
error.type | Error type |
gen_ai.request.model | Request model name |
gen_ai.session.id | Session ID |
gen_ai.user.id | User ID |
Note: Service-level metrics do NOT include
gen_ai.session.idandgen_ai.user.id.
3. Metric Summary
| Metric Name | Service Instance Metric ID | Service Metric ID | Type | Unit |
|---|---|---|---|---|
| MCP Client Operation Duration | one.service.instance.mcp.client.operation.duration | one.service.mcp.client.operation.duration | Histogram | s |
| MCP Client Call Count | one.service.instance.mcp.client.call.count | one.service.mcp.client.call.count | SUM | count |
| Generative AI Token Usage | one.service.instance.gen_ai.client.token.usage | one.service.gen_ai.client.token.usage | Histogram | token |
| Generative AI Client Operation Duration | one.service.instance.gen_ai.client.operation.duration | one.service.gen_ai.client.operation.duration | Histogram | s |
| Generative AI Client Call Count | one.service.instance.gen_ai.client.call.count | one.service.gen_ai.client.call.count | SUM | count |