ficaviolaodorata520/met-museum-mcp-server/api-telemetry

Claude Code and agent skill by ficaviolaodorata520/met-museum-mcp-server

Trust tier 3
  • community
Source check pending

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

Catalog of OpenTelemetry instrumentation built into framework `@cyanheads/mcp-ts-core` — spans, metrics, completion logs, env config, runtime caveats, custom instrumentation patterns, and cardinality rules. Use when enabling OTel export, adding custom spans or metrics in services, debugging missing telemetry, looking up attribute names, or deciding what's safe to put on a metric attribute vs. a span.

Install

npx vskill@latest install ficaviolaodorata520/met-museum-mcp-server/api-telemetry

SKILL.md

The same SKILL.md was published earlier as ficaviolaodorata520/met-museum-mcp-server/api-telemetry.

Overview

The framework auto-instruments every tool, resource, prompt, storage, LLM, speech, and graph call — each gets its own span and the standard counters/histograms. HTTP server requests pick up spans from HttpInstrumentation (all Node.js HTTP traffic, skips /healthz) plus httpInstrumentationMiddleware from @hono/otel on the MCP HTTP endpoint when installed (optional Tier 3 peer — bun add @hono/otel). On Bun, HttpInstrumentation silently no-ops and @hono/otel is the only HTTP coverage. Auth checks, session lifecycle, and task lifecycle are tracked as metrics only — auth decorates the active HTTP span with attributes, sessions and tasks emit counters.

requestId, traceId, and tenantId correlate automatically across spans, metrics, and logs. Pino logs get trace_id/span_id injected when a span is active.

For the helper API surface (withSpan, createCounter, createHistogram, buildTraceparent, etc.) — see the api-utils skill, Telemetry section. This skill is the catalog of what is emitted; that one is the reference for how to emit your own.


Enabling export

OTel is off by default. OTEL_ENABLED=true alone does nothing — you also need an OTLP endpoint. Without an endpoint the SDK is configured but nothing leaves the process.

Env varDefaultPurpose
OTEL_ENABLEDfalseMaster switch. Must be true to start the SDK.
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT—OTLP/HTTP traces endpoint (e.g. http://localhost:4318/v1/traces).
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT—OTLP/HTTP metrics endpoint (e.g. http://localhost:4318/v1/metrics).
OTEL_SERVICE_NAMEpackage.json nameservice.name resource attribute.
OTEL_SERVICE_VERSIONpackage.json versionservice.version resource attribute.
OTEL_TRACES_SAMPLER_ARG1.0Trace sampling ratio (0–1) for TraceIdRatioBasedSampler.
OTEL_LOG_LEVELINFOOTel diagnostic logger level (NONE/ERROR/WARN/INFO/DEBUG/VERBOSE/ALL).

Metrics push via PeriodicExportingMetricReader every 15 seconds. Traces use BatchSpanProcessor.


Runtime support

RuntimeBehavior
Node.js / BunFull NodeSDK. Auto-instrumentations: HTTP server (Node http hooks; skips /healthz), Pino logs (trace_id/span_id injection). On the HTTP transport, when OTel is enabled and @hono/otel is installed, httpInstrumentationMiddleware is also wired onto the MCP endpoint — fills the gap on Bun, where the Node http auto-instrumentation silently no-ops. Manual spans, custom metrics, and OTLP export work on Bun regardless.
Cloudflare Workers / V8 isolatesNodeSDK is unavailable. SDK init no-ops silently. createCounter/createHistogram/withSpan calls still work via the global OTel API but produce no output unless you wire a Worker-compatible exporter and ctx.waitUntil() for flush.

Cloud platform detection auto-populates resource attributes:

DetectedAttributes set
Cloudflare Workerscloud.provider=cloudflare, cloud.platform=cloudflare_workers
AWS Lambdacloud.provider=aws, cloud.platform=aws_lambda, cloud.region from AWS_REGION
GCP Cloud Run / Functionscloud.provider=gcp, cloud.platform=gcp_cloud_run (or gcp_cloud_functions), cloud.region from GCP_REGION
Alldeployment.environment.name from config.environment

Spans

Every handler call gets a span. Nested operations (storage, graph, LLM) become child spans on the same trace. All spans carry code.function.name and code.namespace for code-attribution. Errors are recorded via span.recordException() and SpanStatusCode.ERROR; McpError codes surface as the *.error_code attribute.

Span nameSourceKey attributes
tool_execution:<tool>every tool callmcp.tool.input_bytes, mcp.tool.output_bytes, mcp.tool.duration_ms, mcp.tool.success, mcp.tool.error_code, mcp.tool.partial_success, mcp.tool.batch.{succeeded,failed}_count
resource_read:<resource>every resource handlermcp.resource.uri, mcp.resource.mime_type, mcp.resource.size_bytes, mcp.resource.duration_ms, mcp.resource.success, mcp.resource.error_code
prompt_generation:<prompt>every prompt handlermcp.prompt.input_bytes, mcp.prompt.output_bytes, mcp.prompt.message_count, mcp.prompt.duration_ms, mcp.prompt.success, mcp.prompt.error_code
storage:<op>StorageService (every call)mcp.storage.operation, mcp.storage.duration_ms, mcp.storage.success, mcp.storage.key_count (batch ops)
graph:<op>GraphService (every call)mcp.graph.operation, mcp.graph.duration_ms, mcp.graph.success
gen_ai.chat_completionOpenRouter LLM providergen_ai.system=openrouter, gen_ai.request.model, gen_ai.request.{max_tokens,temperature,top_p,streaming}, gen_ai.response.model, gen_ai.usage.{input,output,total}_tokens
speech:ttsElevenLabs providermcp.speech.provider, mcp.speech.operation, mcp.speech.input_bytes, mcp.speech.output_bytes, mcp.speech.duration_ms, mcp.speech.success
speech:sttWhisper providersame as speech:tts

Trace context propagates across boundaries via W3C traceparent headers. See api-utils → telemetry/trace for withSpan, buildTraceparent, extractTraceparent, createContextWithParentTrace, injectCurrentContextInto, runInContext signatures.


Metrics

All custom metrics are namespaced mcp.* (or process.* / http.client.* where standard semconv applies). Lazy-initialized on first emission; tool, resource, prompt, http.client.request.duration, heartbeat, session, auth, rate-limit, and error metrics are eagerly created at startup so series exist from the first export cycle. LLM, speech, graph, and storage instruments are lazy-initialized on first use.

Tools, resources, prompts
MetricTypeUnitAttributes
mcp.tool.callscounter{calls}mcp.tool.name, mcp.tool.success
mcp.tool.durationhistogrammsmcp.tool.name, mcp.tool.success
mcp.tool.errorscounter{errors}mcp.tool.name, mcp.tool.error_category (upstream/server/client)
mcp.tool.input_byteshistogrambytesmcp.tool.name
mcp.tool.output_byteshistogrambytesmcp.tool.name (success only)
mcp.tool.param.usagecounter{uses}mcp.tool.name, mcp.tool.param (top-level keys supplied by caller)
mcp.resource.readscounter{reads}mcp.resource.name, mcp.resource.success
mcp.resource.durationhistogrammsmcp.resource.name, mcp.resource.success
mcp.resource.errorscounter{errors}mcp.resource.name
mcp.resource.output_byteshistogrambytesmcp.resource.name (success only)
mcp.prompt.generationscounter{generations}mcp.prompt.name, mcp.prompt.success
mcp.prompt.durationhistogrammsmcp.prompt.name, mcp.prompt.success
mcp.prompt.errorscounter{errors}mcp.prompt.name, mcp.prompt.error_category
mcp.prompt.input_byteshistogrambytesmcp.prompt.name
mcp.prompt.output_byteshistogrambytesmcp.prompt.name (success only)
mcp.prompt.message_counthistogram{messages}mcp.prompt.name
mcp.requests.activeup/down counter{requests}— (in-flight handler executions, all three types)
Storage, LLM, speech, graph
MetricTypeUnitAttributes
mcp.storage.operationscounter{ops}mcp.storage.operation, mcp.storage.success
mcp.storage.durationhistogrammsmcp.storage.operation, mcp.storage.success
mcp.storage.errorscounter{errors}mcp.storage.operation
mcp.llm.requestscounter{requests}gen_ai.system, gen_ai.request.model
mcp.llm.durationhistogrammsgen_ai.system, gen_ai.request.model
mcp.llm.errorscounter{errors}gen_ai.system, gen_ai.request.model
mcp.llm.tokenscounter{tokens}gen_ai.request.model, gen_ai.token.type (input/output)
mcp.speech.operationscounter{ops}mcp.speech.operation (tts/stt), mcp.speech.provider, mcp.speech.success
mcp.speech.durationhistogrammsmcp.speech.operation, mcp.speech.provider
mcp.speech.errorscounter{errors}mcp.speech.operation, mcp.speech.provider
mcp.graph.operationscounter{ops}mcp.graph.operation, mcp.graph.success
mcp.graph.durationhistogrammsmcp.graph.operation, mcp.graph.success
mcp.graph.errorscounter{errors}mcp.graph.operation
Transport, auth, sessions, tasks
MetricTypeUnitAttributes
mcp.auth.attemptscounter{attempts}mcp.auth.outcome (success/failure/missing), mcp.auth.failure_reason
mcp.auth.durationhistogrammsmcp.auth.outcome, mcp.auth.failure_reason
mcp.sessions.eventscounter{events}mcp.session.event (created/terminated/rejected/stale_cleanup)
mcp.session.durationhistograms—
mcp.sessions.activeobservable gauge{sessions}—
mcp.heartbeat.failurescounter{failures}mcp.connection.transport (stdio/http)
mcp.http.close_failurescounter{failures}surface (transport/server), trigger (success/error/sse-abort) — per-request close threw or timed out
mcp.http.per_request.createdcounter{instances}kind (server/transport) — per-request McpServer and McpSessionTransport instances created
mcp.http.per_request.finalizedcounter{instances}kind (server/transport) — per-request instances reclaimed by GC; persistent gap vs created indicates a leak
mcp.tasks.createdcounter{tasks}mcp.task.store_type (in-memory/storage)
mcp.tasks.status_changescounter{transitions}mcp.task.status, mcp.task.store_type
mcp.tasks.activeobservable gauge{tasks}— (in-memory store only)
Errors, rate limits, HTTP client
MetricTypeUnitAttributes
mcp.errors.classifiedcounter{errors}mcp.error.classified_code (JSON-RPC code), operation
mcp.ratelimit.rejectionscounter{rejections}mcp.rate_limit.key
http.client.request.durationhistogramshttp.request.method, server.address, http.response.status_code (when > 0; absent on network errors before a response is received)
Process

Auto-registered when process.memoryUsage / process.uptime / perf_hooks are available (Node/Bun, not Workers). The three memory gauges share a single process.memoryUsage() snapshot per collection cycle, refreshed at most every 100 ms.

MetricTypeUnitNotes
process.memory.rssobservable gaugebytesResident set size
process.memory.heap_usedobservable gaugebytesV8 heap used
process.memory.heap_totalobservable gaugebytesV8 total heap
process.uptimeobservable gaugesProcess uptime
process.event_loop.delayobservable gaugemsp99 delay (monitorEventLoopDelay resolution=20)
process.event_loop.utilizationobservable gauge10 = idle, 1 = saturated

Logs

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

Security

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

Quality evaluation

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

Source

Popularity

7-day trend score
0

Not refreshed yet.

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/ficaviolaodorata520/met-museum-mcp-server/api-telemetry/badge)](https://verified-skill.com/skills/ficaviolaodorata520/met-museum-mcp-server/api-telemetry)

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