api-telemetry

api-telemetry is a skill for Claude Code from cyanheads/obsidian-mcp-server. It costs 85 tokens per session (9,119 once invoked), scanned A, original, Apache-2.0.

A guide to OpenTelemetry monitoring in the Cyanheads MCP TypeScript framework. OpenTelemetry is a standard way to record traces, measurements, and logs so service activity can be observed.

In plain words
What is it for?
Use it when enabling telemetry export, adding custom traces or measurements, investigating missing telemetry, or checking how request and tool activity is correlated.
Why use it?
It helps developers understand what the framework records automatically and how to connect related requests, tool runs, metrics, and logs. It also explains runtime limitations and configuration details.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the obsidian-mcp-server plugin — 33 skills, 1 MCP server shipped together

Good fit Use it when enabling telemetry export, adding custom traces or measurements, investigating missing telemetry, or checking how request and tool activity is correlated.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cyanheads/obsidian-mcp-server/api-telemetry
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cyanheads/obsidian-mcp-server --skill api-telemetry
Clone the repo
git clone --depth 1 https://github.com/cyanheads/obsidian-mcp-server

Made for: Claude Code.

Or install obsidian-mcp-server, the plugin that ships this one along with the rest of its 33 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-telemetry

README.md
[![agentmods](https://agentmods.dev/badge/skills/cyanheads/obsidian-mcp-server/api-telemetry/github.svg)](https://agentmods.dev/skills/cyanheads/obsidian-mcp-server/api-telemetry)
Your own site
<a href="https://agentmods.dev/skills/cyanheads/obsidian-mcp-server/api-telemetry"><img src="https://agentmods.dev/badge/skills/cyanheads/obsidian-mcp-server/api-telemetry/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-telemetry

Your own site · 80×15
<a href="https://agentmods.dev/skills/cyanheads/obsidian-mcp-server/api-telemetry"><img src="https://agentmods.dev/badge/skills/cyanheads/obsidian-mcp-server/api-telemetry.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,119 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.09119
Opus 5.5 $0.00034 $0.03648
Sonnet 5.5 $0.00017 $0.01824
Haiku 4.5 $0.00009 $0.00912

Measured 15d ago against content hash 9f475301e933, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-telemetry scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

8 near-identical copies found in the catalogue:

framework-skills/api-telemetry/SKILL.md · 330 lines

How it starts

The opening of the file, as written. The whole thing — 330 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 and session lifecycle are tracked as metrics only — auth decorates the active HTTP span with attributes, sessions emit counters.

requestId, traceId, and tenantId correlate automatically across spans, metrics, and logs. Framework log records carry traceId/spanId from the request context.

A handler's ctx.traceId / ctx.spanId name the execution span it runs in — tool_execution:<name> or resource_read:<name> — not the enclosing HTTP request span. Under HTTP the trace ID is the request's, so handler logs join to the request; the span ID is the child execution's, so they join to that span's attributes and duration. On stdio, where no transport span exists, both are still populated from the execution span the framework opens. Both are undefined when telemetry is disabled: the non-recording span a disabled pipeline produces carries all-zero IDs, and the framework reports no correlation rather than IDs that correlate to nothing.

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 var Default Purpose
OTEL_ENABLED false Master switch. Must be true to start the SDK.
OTEL_EXPORTER_OTLP_ENDPOINT — OTLP/HTTP base URL (e.g. http://localhost:4318). Traces go to <base>/v1/traces, metrics to <base>/v1/metrics; a path prefix is kept.
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT — OTLP/HTTP traces endpoint (e.g. http://localhost:4318/v1/traces). Overrides the base for traces; used as-is.
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT — OTLP/HTTP metrics endpoint (e.g. http://localhost:4318/v1/metrics). Overrides the base for metrics; used as-is.
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT — OTLP/HTTP logs endpoint (e.g. http://localhost:4318/v1/logs). Opt-in log export; used as-is and never derived from the base.
OTEL_SERVICE_NAME createApp name → package.json name service.name resource attribute. Seeded from createApp({ name }) when unset; an env value wins.
OTEL_SERVICE_VERSION package.json version service.version resource attribute.
OTEL_TRACES_SAMPLER_ARG 1.0 Trace sampling ratio (0–1) for TraceIdRatioBasedSampler.
OTEL_LOG_LEVEL INFO OTel diagnostic logger level (NONE/ERROR/WARN/INFO/DEBUG/VERBOSE/ALL; warning/err/information accepted). Diag output goes to stderr at every level, never stdout.

Read the full file on GitHub · 330 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago Changed · +35 lines 9f475301e933
  2. 1mo ago Changed · +42 lines 24aa1e46913c
  3. 1mo ago Changed d56293e37e77
  4. 1mo ago First seen · 253 lines · 85 tokens per session scan A bb656e39dd17

Subscribe to this mod's changes

api-telemetry is a skill published in the GitHub repository cyanheads/obsidian-mcp-server (698 stars, last pushed 15d ago), licensed Apache-2.0. It adds 85 tokens to every session and 9,119 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

widget-authoring

Author or edit ThinkEx widgets, which are self-contained interactive HTML blocks inside documents. Use when the user explicitly asks for a widget, asks for interaction or live computation, or wants a document visual that ordinary blocks cannot express.

ThinkEx-OSS/thinkex · 49 tokens

pkm-session-end

Use when wrapping up a work session — creates devlog entry, captures undocumented decisions/research/debugging, audits link health of session work, and updates project index. Primarily used via the pkm-capture agent.

AdrianV101/obsidian-pkm-plugin · 49 tokens

pkm-write

Use when writing to the vault — creating new notes (vaultwrite), editing existing notes (vaultedit, vaultappend, vaultupdatefrontmatter). Handles duplicate checking, link discovery, annotations, and index updates for new notes. Provides guidelines for modifications.

AdrianV101/obsidian-pkm-plugin · 54 tokens

pkm-explore

Use when researching what the vault knows about a topic — performs graph + semantic exploration with gap analysis to map existing knowledge and find missing connections. Primarily used via the vault-explorer agent. Not for routine session-start context loading (hooks handle that).

AdrianV101/obsidian-pkm-plugin · 55 tokens

triage-tasks

Use when you want to review and batch-update open vault task statuses for the current project or across all projects.

AdrianV101/obsidian-pkm-plugin · 27 tokens

tackle-task

Use when starting work on a specific vault task, when a task title or path is mentioned, or when coming from triage output.

AdrianV101/obsidian-pkm-plugin · 31 tokens