Skip to main content
FrontMCP has native observability built in. Enable it with a single config line and get automatic distributed tracing, structured JSON logging, and per-request log collection across your entire server — every tool call, resource read, prompt invocation, auth flow, and transport session.
CapabilityWhat It Does
OpenTelemetry tracingAutomatic spans for all 33 SDK flows with parent-child hierarchy
Structured loggingJSON log entries with trace correlation, sent to any backend
Request log collectionPer-request aggregated view of all events during a request lifecycle
this.telemetry APIDeveloper-facing API for custom spans, events, and attributes in tools
Vendor integrationsOTLP, Coralogix, Datadog, Logz.io, Grafana, winston, pino

How It Works

@FrontMcp({
  observability: true, // That's it
})
When enabled:
  • Zero config — 103+ hooks register automatically on every flow
  • Single trace ID — all spans in a request share the same W3C trace ID
  • Privacy-safe session ID — a truncated SHA-256 hash, never the real session ID
  • Zero overhead when unused — without a TracerProvider, all OTel calls are no-ops
  • MCP-interoperable — uses rpc.system = "mcp" and mcp.* attributes for cross-framework tracing

What Gets Instrumented

Every flow in the SDK is automatically traced:
CategoryFlows
HTTP & TransportHTTP requests, SSE sessions, Streamable HTTP, Stateless HTTP
Toolscall-tool (every stage), list-tools
Resourcesread-resource, list-resources, list-templates, subscribe, unsubscribe
Promptsget-prompt, list-prompts
Agentscall-agent (with nested tool call tracking)
Authauth:verify, session:verify
OAuthtoken, authorize, callback, provider-callback, register
Skillssearch, load, llm-txt, llm-full-txt, API
Elicitationrequest, result
Othercompletion, well-known endpoints, logging/set-level

Logging vs Tracing

They’re complementary, not competing:
LoggingTracing
WhatEvent stream — discrete log linesRequest lifecycle — spans with timing
PurposeDebug, audit, error forensicsPerformance analysis, dependency mapping
Export toStdout, winston, pino, OTLPOTLP, Jaeger, Zipkin
Connectiontrace_id on every log lineNative parent-child span tree
A log line says “what happened.” A span says “how long it took.” When both share the same trace_id, platforms like Coralogix or Datadog show logs inline within a trace waterfall.

Learn More

Setup Guide

Step-by-step: install, configure backends, use this.telemetry

Telemetry API Reference

Full API for TelemetryAccessor, TelemetrySpan, and testing utilities

OpenTelemetry

OpenTelemetry documentation

Plugin System

How plugins hook into the request lifecycle