reaatech/otel-genai-semconv/anthropic-instrumentation

Claude Code and agent skill by reaatech/otel-genai-semconv

Trust tier 3
  • community
Source check pending

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

Install

npx vskill@latest install reaatech/otel-genai-semconv/anthropic-instrumentation

SKILL.md

The same SKILL.md was published earlier as reaatech/otel-genai-semconv/anthropic-instrumentation.

Anthropic Instrumentation Skill

Overview

This skill provides instrumentation for Anthropic SDK calls, capturing OTel GenAI semantic convention compliant spans.

Usage

typescript
import { AnthropicInstrumentation } from '@reaatech/otel-genai-semconv-anthropic';
const instrumentation = new AnthropicInstrumentation({
trackCosts: true,
captureRequestHeaders: true,
captureResponseHeaders: true,
});
instrumentation.instrument(anthropicClient);

Captured Attributes

  • gen_ai.request.model — Model name (e.g., "claude-opus-20240229")
  • gen_ai.request.max_tokens — Max tokens limit
  • gen_ai.response.model — Actual model used
  • gen_ai.response.finish_reasons — Stop reason (e.g., "end_turn")
  • gen_ai.usage.input_tokens — Input tokens
  • gen_ai.usage.output_tokens — Output tokens
  • llm.cost.total — Total cost in USD

Events

  • gen_ai.system.message — System prompt content
  • gen_ai.user.message — User message content
  • gen_ai.assistant.message — Assistant response
  • gen_ai.choice — Individual choice data

Token Counting

Uses estimation-based token counting with caching for performance:

typescript
import { AnthropicTokenCounter } from '@reaatech/otel-genai-semconv-anthropic';
const counter = new AnthropicTokenCounter();
const tokens = counter.countTokens('Hello, world!', 'claude-3-opus-20240229');

Streaming Support

The instrumentation automatically handles Anthropic's streaming API via stream: true:

typescript
const stream = await anthropic.messages.create({
model: 'claude-3-opus-20240229',
max_tokens: 500,
messages: [{ role: 'user', content: 'Write a haiku' }],
stream: true,
});
for await (const event of stream) {
// Instrumentation tracks TTFT, chunk count, and aggregates deltas
}

Related Packages

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

7-day trend score
5

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/reaatech/otel-genai-semconv/anthropic-instrumentation/badge)](https://verified-skill.com/skills/reaatech/otel-genai-semconv/anthropic-instrumentation)

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