tuning-sampling-and-trace-derived-metrics

tuning-sampling-and-trace-derived-metrics is a skill for Claude Code, Codex from talkops-ai/talkops-mcp. It costs 175 tokens per session (1,035 once invoked), scanned A, original, Apache-2.0.

A configuration workflow for OpenTelemetry trace sampling and derived metrics. OpenTelemetry collects traces about requests; sampling keeps selected traces, while span metrics and service graphs produce request measurements and dependency links.

In plain words
What is it for?
Use it to configure head or tail sampling, load-balance trace sampling, and create metrics and service topology data before traces are discarded.
Why use it?
It helps reduce trace storage and ingestion costs while preserving request counts, durations, error measurements, and service relationships. It also coordinates sampling across collectors so decisions work consistently.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to configure head or tail sampling, load-balance trace sampling, and create metrics and service topology data before traces are discarded.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/talkops-ai/talkops-mcp/tuning-sampling-and-trace-derived-metrics
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 talkops-ai/talkops-mcp --skill tuning-sampling-and-trace-derived-metrics
Clone the repo
git clone --depth 1 https://github.com/talkops-ai/talkops-mcp

Made for: Claude Code, Codex.

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 tuning-sampling-and-trace-derived-metrics

README.md
[![agentmods](https://agentmods.dev/badge/skills/talkops-ai/talkops-mcp/tuning-sampling-and-trace-derived-metrics/github.svg)](https://agentmods.dev/skills/talkops-ai/talkops-mcp/tuning-sampling-and-trace-derived-metrics)
Your own site
<a href="https://agentmods.dev/skills/talkops-ai/talkops-mcp/tuning-sampling-and-trace-derived-metrics"><img src="https://agentmods.dev/badge/skills/talkops-ai/talkops-mcp/tuning-sampling-and-trace-derived-metrics/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 tuning-sampling-and-trace-derived-metrics

Your own site · 80×15
<a href="https://agentmods.dev/skills/talkops-ai/talkops-mcp/tuning-sampling-and-trace-derived-metrics"><img src="https://agentmods.dev/badge/skills/talkops-ai/talkops-mcp/tuning-sampling-and-trace-derived-metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 175 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,035 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.
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.00175 $0.01035
Opus 5.5 $0.00070 $0.00414
Sonnet 5.5 $0.00035 $0.00207
Haiku 4.5 $0.00017 $0.00103

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

Security

Grade A, and why

tuning-sampling-and-trace-derived-metrics 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/estimate_tail_sampling_capacity.py, scripts/render_tail_sampling_policies.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/opentelemetry-mcp-server/skills/tuning-sampling-and-trace-derived-metrics/SKILL.md · 37 lines

How it starts

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

Tuning Sampling and Trace-Derived Metrics

Preconditions

  • Read otel://server/capabilities via MCP resources (preferring MCP over raw kubectl commands) to verify write permissions (allow_write) and enabled pipeline toolset.
  • Read otel://sampling/{namespace}/{collector}, otel://spanmetrics/{namespace}/{collector}, otel://collector/{namespace}/{name}, and otel://collector/{namespace}/{name}/config to inspect existing sampling policies, connector wiring, deployment mode (daemonset, deployment, statefulset), and replica count.

Sampling & Connector Workflow Checklist

  • Step 1 — Wire Pre-Sampling Connectors (spanmetrics & servicegraph) First:
    • Always compute RED metrics (calls, duration) and service topology edges (service_graph_request_total) before tail sampling drops normal spans, or else derived request counts and error percentages become skewed.
    • Call otel_configure_connectors (namespace, collector_name, connectors=["spanmetrics", "servicegraph"], connector_options={"dimensions": ["http.request.method", "http.response.status_code"]}, dry_run=True).
    • Consult references/spanmetrics-and-servicegraph.md for dimension cardinality limits and exemplar rules.
  • Step 2 — Select Sampling Strategy & Size Tail-Sampler Memory:
    • Consult references/sampling-decision-matrix.md to choose between probabilistic head sampling and tail sampling.
    • Hard Constraint (CFG_TAIL_SAMPLING_NO_TRACE_AFFINITY): Never configure tail_sampling on a daemonset collector or a multi-replica deployment without a loadbalancing exporter (routing_key: traceID) upstream.
    • Run scripts/estimate_tail_sampling_capacity.py --spans-per-sec 20000 --avg-spans-per-trace 25 --decision-wait-sec 10 to calculate num_traces, memory MiB, and replica count.
  • Step 3 — Preview Connector & Sampling Mutations (dry_run=True):
    • Call otel_configure_sampling (namespace, collector_name, strategy="tail", sampling_options={"sample_rate": 0.10, "decision_wait": "10s", "num_traces": 50000, "has_load_balancing_exporter": True}, dry_run=True) or run scripts/render_tail_sampling_policies.py for custom composite policies.
    • When asked to temporarily disable sampling (strategy="none", 100% capture) during a live incident, warn about downstream Tempo rate_limited / storage spikes, preview with otel_configure_sampling(..., strategy="none", dry_run=True), and explicitly recommend restoring tail sampling immediately once incident trace capture finishes.
    • [GATE] Present the capacity calculation, connector wiring, and unified diff to the user for approval before applying.
  • Step 4 — Apply & Verify Pipeline Health:
    • Re-run otel_configure_connectors and otel_configure_sampling with dry_run=False.
    • Verify via otel_diagnose_collector that no CFG_CONNECTOR_LOOP, CFG_TAIL_SAMPLING_ON_DAEMONSET, or RT_MEMORY_PRESSURE findings are reported.

Read the full file on GitHub · 37 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 37 lines · 175 tokens per session scan A e3dfe24ef658

Subscribe to this mod's changes

tuning-sampling-and-trace-derived-metrics is a skill published in the GitHub repository talkops-ai/talkops-mcp (4 stars, last pushed 12d ago), licensed Apache-2.0. It adds 175 tokens to every session and 1,035 once invoked, about $0.0007 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-11-18.

Related

tuning-sampling-and-trace-derived-metrics compared with skills from other repositories

tuning-sampling-and-trace-derived-metrics next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tuning-sampling-and-trace-derived-metricstalkops-ai/talkops-mcpSkill412d agoApache-2.0A175Claude Code, Codex
argocdalivirgo/Major-AI-SkillsSkill6yesterdayMITA42Claude Code
airdrop-hunting-guidenirholas/three.wsSkill287yesterdayApache-2.0A54Claude Code, Codex
opik-diagnosecomet-ml/opik-mcpSkill2274d agoApache-2.0A187Claude Code
ue-mcp-epic-routingdb-lyon/ue-mcpSkill526todayMITA81Claude Code, Codex
qa-knowledgegriddynamics/rosettaSkill3825d agoApache-2.0A32Claude Code, Codex
x-use-reviewihuzaifashoukat/x-useSkill1877d agoMITA56Claude Code