agentfront/frontmcp/frontmcp-observability

Claude Code and agent skill by agentfront/frontmcp

Trust tier 3
  • community
  • ext:[{"type":"plugin","description":"Custom plugin integration"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when adding tracing, structured logging, metrics, or monitoring to a FrontMCP server. Covers zero-config OpenTelemetry distributed tracing across all flows; the this.telemetry API for custom spans, events, and attributes in tools, plugins, agents, and skills; structured JSON logging with trace correlation and configurable sinks (Winston, Pino, stdout); the off-by-default /metrics endpoint (process and framework metrics, Prometheus-compatible); event-loop stall detection that names the calls in flight; vendor integrations (Coralogix, Datadog, Logz.io, Grafana Cloud, or any OTLP backend); and testing spans, log correlation, and instrumentation. Triggers: observability, telemetry, tracing, logging, monitoring, OpenTelemetry, OTel, spans, metrics, Prometheus, event loop stall, blocked event loop, Datadog, Coralogix, Logz.io, Grafana, Winston, Pino.

Install

npx vskill@latest install agentfront/frontmcp/frontmcp-observability

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as agentfront/frontmcp/frontmcp-observability.

FrontMCP Observability

Router for adding observability to FrontMCP servers. Covers distributed tracing (OpenTelemetry), structured JSON logging, per-request log collection, the this.telemetry developer API, and vendor integrations.

When to Use This Skill

Must Use
  • Adding tracing, logging, or monitoring to a FrontMCP server
  • Connecting Coralogix, Datadog, Logz.io, Grafana, or any OTLP backend
  • Using this.telemetry to create custom spans in tools, plugins, or agents
  • Setting up structured logging with winston, pino, or NDJSON stdout
  • Testing that spans and log entries are created correctly
Recommended
  • Before going to production (see also frontmcp-production-readiness)
  • When debugging request latency or error rates
  • When building plugins that need trace context propagation
Skip When
  • Building a prototype that doesn't need observability yet
  • Configuring auth, transport, or throttle (see frontmcp-config)
  • Setting up the project from scratch (see frontmcp-setup)
Decision: Use this skill when you need to observe, trace, or log your server. Start with tracing-setup for auto-instrumentation, add structured-logging for production logs, and use telemetry-api for custom spans in your code.

Prerequisites

  • A working FrontMCP server (see frontmcp-setup)
  • npm install @frontmcp/observability

Step 1: Choose What You Need

I want to...Reference
Enable auto-tracing for all flowsreferences/tracing-setup.md
Add structured JSON logging with trace correlationreferences/structured-logging.md
Create custom spans in tools/pluginsreferences/telemetry-api.md
Connect Coralogix, Datadog, Logz.io, Grafanareferences/vendor-integrations.md
Test that spans and logs are correctreferences/testing-observability.md
Expose Prometheus /metrics endpointreferences/metrics-endpoint.md
Find the tool that blocks the event loopreferences/stall-detection.md

Step 2: Enable Observability

The simplest way — one config line:

typescript
@FrontMcp({
observability: true,
})

This enables auto-tracing for all SDK flows. Add structured logging:

typescript
@FrontMcp({
observability: {
tracing: true,
logging: { sinks: [{ type: 'stdout' }] },
requestLogs: true,
},
})

observability installs ObservabilityPlugin for you, so don't also list ObservabilityPlugin.init() in @FrontMcp({ plugins }). A server that does both fails at startup with PluginConfiguredTwiceError (code PLUGIN_CONFIGURED_TWICE): ObservabilityPlugin is configured twice: by @FrontMcp({ observability }) and by an ObservabilityPlugin entry in @FrontMcp({ plugins }). Move the entry's options to observability and remove the entry; only observability also connects the logging sinks to the server's logger. Up to 1.11.0 the server started anyway, and the entry's options could be dropped for the ones observability gives.

Step 3: Read the Relevant Reference

Follow the scenario routing table above to find the right reference for your use case.

Scenario Routing Table

ScenarioReferenceDescription
Enable OpenTelemetry tracingreferences/tracing-setup.mdZero-config auto-instrumentation, setupOTel(), span hierarchy
Add JSON logs with trace correlationreferences/structured-logging.mdSinks (stdout, console, OTLP, winston, pino), redaction, log format
Custom spans in tools/pluginsreferences/telemetry-api.mdthis.telemetry.startSpan(), withSpan(), addEvent(), setAttributes()
Connect to monitoring platformsreferences/vendor-integrations.mdCoralogix, Datadog, Logz.io, Grafana — OTLP and direct
Test spans and log entriesreferences/testing-observability.mdcreateTestTracer(), assertSpanExists(), integration test patterns
Expose Prometheus /metrics endpointreferences/metrics-endpoint.mdOff-by-default Prometheus scrape endpoint with process + framework counters
Find what blocks the event loopreferences/stall-detection.mdobservability.stalls: calls in flight per stall, GC apart, stall counter

Common Patterns

PatternCorrectIncorrectWhy
Enable observabilityobservability: true in @FrontMcp configImport and install ObservabilityPlugin manuallyConfig-driven is the standard pattern since v1.0
Custom spansthis.telemetry.withSpan('op', fn)trace.getTracer().startSpan() directlythis.telemetry auto-inherits trace context
Log correlationthis.logger.info('msg', { key: val })console.log('msg')SDK logger flows through StructuredLogTransport with trace_id
Session IDUse mcp.session.id attribute (hashed)Log the real session IDPrivacy: the hash is sufficient for correlation
Vendor integrationUse { type: 'otlp', endpoint } sinkBuild vendor-specific HTTP clientsOTLP is the universal standard

Quick Reference: What Gets Traced

CategoryFlowsAttributes
HTTP requeststraceRequest, auth, route, finalizehttp.request.method, url.path
Tool callsparseInput → findTool → execute → finalizemcp.component.type=tool, enduser.id
Resource readsparseInput → findResource → executemcp.component.type=resource, mcp.resource.uri
PromptsparseInput → findPrompt → executemcp.component.type=prompt
AgentsparseInput → findAgent → execute (nested tool calls)mcp.component.type=agent
Authverify, session verify, OAuth flowsfrontmcp.auth.mode, frontmcp.auth.result
TransportSSE, Streamable HTTP, Stateless HTTPfrontmcp.transport.type
Skillssearch, load, HTTP endpointsfrontmcp.flow.name

Verification Checklist

Configuration
  • [ ] @frontmcp/observability installed
  • [ ] observability field added to @FrontMcp config
  • [ ] TracerProvider configured (via setupOTel() or external SDK); the startup warning about a missing provider appears only when none is registered
  • [ ] Logging sinks configured for production (stdout or OTLP)
Runtime
  • [ ] Spans appear in trace backend when calling a tool
  • [ ] Log entries include trace_id and span_id
  • [ ] this.telemetry is available in tool execution contexts, and @frontmcp/observability is imported so it type-checks
  • [ ] Session tracing ID is consistent across all spans in a request
  • [ ] Errors are recorded on spans with ERROR status
Testing
  • [ ] Tests verify span creation with createTestTracer()
  • [ ] Tests verify log entries via CallbackSink
  • [ ] No test isolation issues (each test resets exporter)

Troubleshooting

ProblemCauseSolution
this.telemetry is undefined in a toolobservability not enabled on the parent @FrontMcp configSet observability: true (or a config object) in the @FrontMcp decorator; see tracing-setup
Property 'telemetry' does not exist (TS2339)@frontmcp/observability is not part of the compilationAdd import type {} from '@frontmcp/observability' where you use it (or once in the server entry); see telemetry-api
Spans appear without trace_id in logsLogger not connected to StructuredLogTransportUse this.logger, not console; see structured-logging
OTLP exporter silently drops spansEndpoint URL points at the UI, not the OTLP collectorUse the OTLP HTTP/gRPC ingest endpoint exposed by your vendor (Datadog, Coralogix, Logz, etc.); see vendor-integrations
Real session ID appears in span attributesA custom span attribute writes session.id directlyUse the SDK-provided mcp.session.id (already hashed); never log the raw session token
Tests randomly fail with leftover spansExporter retained between testsReset the in-memory exporter in afterEach; see testing-observability
OTel auto-instrumentation double-traces requestsBoth setupOTel() AND a vendor agent attached to the processPick one: either FrontMCP-managed OTel OR the vendor agent — not both
Startup fails with PLUGIN_CONFIGURED_TWICEobservability is set and ObservabilityPlugin is listed in pluginsConfigure it in one place: move the entry's options to observability and remove the entry

Examples

Each reference has matching examples under `examples/<reference>/`:

tracing-setup
ExampleLevelDescription
`basic-tracing`BasicEnable auto-tracing and see spans printed to your terminal.
`production-tracing`IntermediateFull production observability — traces to OTLP, structured logs to stdout, per-request log collection.
structured-logging

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
147
Repository forks
6
7-day trend score
25

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 26 Aug 2026, 3 months ago.

Extension points

  • pluginCustom plugin integration

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/agentfront/frontmcp/frontmcp-observability/badge)](https://verified-skill.com/skills/agentfront/frontmcp/frontmcp-observability)

Something wrong with this skill or its page? Tell us.