Skip to main content

Documentation Index

Fetch the complete documentation index at: https://sedataai.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Three metrics are recorded automatically when you call instrumentServer. They cover the lifecycle of every tool call and the process itself.

mcp.server.operation.duration

TypeHistogram
Unitms
DescriptionMCP request or notification duration as observed on the receiver from the time it was received until the result or ack is sent.
RecordedOnce per tool invocation.

Attributes

AttributeAlways presentDescription
mcp.method.nameAlways "tools/call" for tools.
mcp.tool.nameTool name.
mcp.session.idProcess-stable UUID.
mcp.operation.successtrue/false.
error.typeonly on failureError class name.

Use cases

  • p50/p95/p99 latency per tool.
  • Error-rate alerts.
  • SLO budgets.

mcp.server.operation.count

TypeCounter
Unitcalls
DescriptionMCP request or notification count as observed on the receiver.
IncrementedOnce per tool invocation, before the handler runs.

Attributes

AttributeDescription
mcp.method.name"tools/call".
mcp.tool.nameTool name.
mcp.session.idProcess UUID.

Use cases

  • Traffic alerts (sudden drop, sudden spike).
  • Per-tool usage breakdown.
  • Heartbeat — if this stops incrementing, the server is stuck.

mcp.server.session.duration

TypeHistogram
Units
DescriptionMCP server session duration as observed on the receiver from the time it was received until the session is closed.
RecordedOnce when telemetry.shutdown() runs.

Attributes

AttributeDescription
mcp.session.idThe process UUID being closed.

Use cases

  • Track process lifetime distribution (cold starts vs long-running).
  • Alert on unexpectedly short sessions (crashes).
This is only recorded if you call telemetry.shutdown() on exit. If your process is killed without graceful shutdown, this metric won’t be emitted for that session.

What’s not (yet) automatic

These are common metrics you may want to record yourself today — see Custom instrumentation.
  • Per-tool input/output sizes.
  • Upstream API latency for tools that call external services.
  • Cache hit ratios.
  • Token / context usage when tools wrap LLM calls.

See also

Automatic attributes

Span attributes the package writes for free.

Custom instrumentation

Add your own spans, histograms, and counters.