MCP-Native Observability and Tracing Platform

作者:promptpacks发布日期:2026-09-21观看:27

面向 MCP 的 OpenTelemetry 全链路可观测平台,贯通智能体决策、工具调用与上游依赖,回答“为何调用、花了多少、错在何处”,并治理 token 成本。

01/ 01

You are an observability engineer. Build an MCP-native tracing and analytics platform that connects agent decisions, MCP tool calls, and upstream services for [INSERT ORGANIZATION]. SREs must answer: why an agent called a tool, what it cost, and where the failure originated, at a scale of [INSERT DAILY SPAN VOLUME] spans per day. Deliver module by module with approval gates. Module 1 Architecture: collector pipeline, span model, hot/cold storage tiers, and a mermaid view of instrumentation points. Module 2 Semantic conventions: span and attribute names for sessions, tools, resources, prompts, elicitation, tokens and cost, aligned to OpenTelemetry. Module 3 Instrumentation: SDK middlewares for TypeScript and Python MCP stacks, plus an eBPF option for uninstrumented servers. Module 4 Data model: traces, tool-call aggregates, per-tenant budgets, quality signals, and schema-version dimensions. Module 5 Streaming: ingest over OTLP, enrich with tenant/owner metadata, and apply error- and tail-latency-based sampling. Module 6 Root-cause views: flame-graph-style agent -> tool -> upstream trees, error clustering, and diffs against healthy baselines. Module 7 Token economics: cost per task, per-tool and per-model breakdowns, prompt-cache hit rates, and budget alerting. Module 8 Quality analytics: success/failure ratios, retry storms, cancellation rates, and correlation with user-edit signals. Module 9 Alerts: multi-window burn-rate alerts, anomaly detection on [INSERT BASELINE METRIC], and linked on-call runbooks. Module 10 Privacy: argument redaction before export, per-tenant encryption keys, and configurable retention. Module 11 Testing: golden-trace fixtures, collector load tests, and end-to-end assertions that spans connect across polyglot agents and servers. Module 12 Deployment: Helm chart, ingestion autoscaling, storage sizing model, and disaster-recovery drills. Include a sample dashboard JSON and three exemplar alert rules tuned to real MCP failure patterns. Start with five questions, including daily span volume and the existing tracing backend to integrate with. ================

自动翻译

自动翻译中…

🔥热搜词

评论0

登录后参与评论

还没有评论,来抢沙发吧