---
summary: Telemetry slim-down — focused MCP attribute keys replace semconv, lighter OTel instrumentation, removed per-call memory profiling and unused metric exports
breaking: false
---

# 0.1.7 — 2026-03-17

Telemetry refactor: slimmed OTel instrumentation, replaced bloated semconv module with focused MCP attribute keys, removed per-call memory profiling.

## Changed

- **`semconv.ts` → `attributes.ts`** — Replaced the 377-line `semconv.ts` (which re-exported standard OTel constants) with a focused `attributes.ts` containing only MCP-specific and actively-used attribute keys. Standard OTel conventions (HTTP, cloud, service, network, etc.) should now be imported directly from `@opentelemetry/semantic-conventions`.
- **`ATTR_CODE_FUNCTION` → `ATTR_CODE_FUNCTION_NAME`** — Renamed to align with upstream OTel semantic conventions deprecation of `code.function` in favor of `code.function.name`.
- **Targeted HTTP instrumentation** — Replaced `@opentelemetry/auto-instrumentations-node` (heavy, pulls many transitive deps) with `@opentelemetry/instrumentation-http` for a lighter footprint. Pino instrumentation remains unchanged.
- **Prompt measurement simplified** — `measurePromptGeneration` now emits a structured log only (no OTel span or metric instruments). Prompts are pure synchronous template functions; full spans were unnecessary overhead.
- **Removed per-call memory profiling** — `measureToolExecution` no longer captures RSS/heap before/after/delta on every tool call. Reduces per-call overhead; use external process monitoring for memory tracking.
- **Trimmed metrics API** — Removed `createObservableCounter` and `createObservableUpDownCounter` from public exports. Use `getMeter()` directly for these instrument types.
- **`TextEncoder` caching** — `toBytes()` in performance module now reuses a singleton `TextEncoder` instead of allocating one per call.
- **OTel shutdown timer leak fix** — `shutdownOpenTelemetry` now clears the timeout timer on successful shutdown.
- Updated `msw` dev dependency from 2.12.11 to 2.12.12.
- Updated `skills/api-utils/SKILL.md` to reflect new telemetry module names and trimmed metrics API.

## Removed

- `src/utils/telemetry/semconv.ts` — Replaced by `attributes.ts`.
- `tests/utils/telemetry/semconv.test.ts` — Replaced by `attributes.test.ts`.
- Memory tracking span attributes (`ATTR_MCP_TOOL_MEMORY_RSS_*`, `ATTR_MCP_TOOL_MEMORY_HEAP_USED_*`).
- Unused standard OTel attribute re-exports (`ATTR_SERVICE_*`, `ATTR_HTTP_*`, `ATTR_CLOUD_*`, `ATTR_URL_*`, `ATTR_NETWORK_*`, `ATTR_ERROR_TYPE`, `ATTR_EXCEPTION_*`, `ATTR_USER_AGENT_ORIGINAL`, etc.).
- Unused MCP attributes (`ATTR_MCP_REQUEST_ID`, `ATTR_MCP_OPERATION_NAME`, `ATTR_MCP_SESSION_ID`, `ATTR_MCP_TASK_ID`, `ATTR_MCP_PROMPT_*`).
