observability-integrations
Configure mcp-agent logging, OpenTelemetry tracing, token accounting, streaming, provider extras, local OpenAI-compatible providers, and LangChain/CrewAI tool adapters.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- observability-integrations
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Configure mcp-agent logging, OpenTelemetry tracing, token accounting, streaming, provider extras, local OpenAI-compatible providers, and LangChain/CrewAI tool adapters.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/logging-and-tracing.md7.6 KB
- 参考文档references/provider-integrations.md7.7 KB
- 参考文档references/troubleshooting.md6.8 KB
03 SKILL.md 正文
observability-integrations
Use this sub-skill when a task involves mcp-agent observability or optional ecosystem integrations: structured logger transports, OpenTelemetry exporters, usage telemetry, token counters, progress displays, streaming callbacks, provider-specific extras, local OpenAI-compatible endpoints, LangChain tools, or CrewAI tools.
Start Here
- Read
references/logging-and-tracing.mdfor logger transport configuration, OTEL exporter syntax, trace helpers, token accounting, progress displays, streaming events, and safe event-log inspection. - Read
references/provider-integrations.mdfor optional provider extras, import-vs-credential failures, model selector knobs, LM Studio/local OpenAI-compatible endpoints, and LangChain/CrewAI wrappers. - Read
references/troubleshooting.mdwhen config validation, OTEL export, JSONL logs, token counters, progress output, streaming, provider imports, adapters, or local model endpoints fail. - Run
python scripts/check_observability_config.py --helpbefore editing config; use--config mcp_agent.config.yaml --secrets mcp_agent.secrets.yaml --jsonfor credential-redacted diagnostics. - Run
python scripts/summarize_event_log.py --helpand then point it at a small JSONL event log to validate file transport output without replaying interactive progress UI.
Core Workflows
- Enable structured logging with
logger.transports,logger.level,logger.progress_display, and optional file/HTTP settings; preferfileplusconsolefor local debugging and add HTTP only when an endpoint is intentionally configured. - Enable tracing with
otel.enabled: true,otel.service_name,otel.sample_rate, and one or more exporters:console,file, orotlpwith endpoint and optional headers. - Correlate logs and traces by running inside
MCPApp.run()and usingapp.logger,running_app.context.logger, oragent.logger; active spans injecttrace_idandspan_idinto events. - Inspect token usage through the app or agent context token counter after AugmentedLLM calls; use progress display only for interactive TTY runs and use logs or summaries in CI.
- Treat provider SDKs and tool ecosystems as optional extras: import the relevant AugmentedLLM/tool adapter only after installing the matching extra and configuring non-secret model defaults.
- For streaming, consume
generate_stream()events by type and keep callbacks non-blocking; usegenerate_str_stream()only when text deltas are enough.
Route Elsewhere
- Use
../core-sdk/SKILL.mdfor MCPApp, Agent, Settings, config/secrets basics, RequestParams fundamentals, local tool decorators, and normal provider setup. - Use
../cli-cloud-operations/SKILL.mdfor cloud log tailing, cloud logger commands, deployment diagnostics, app/server status, and CLI authentication. - Use
../mcp-server-integration/SKILL.mdfor MCP auth internals, server creation, transport semantics, upstream session lifecycle, and app-as-server behavior. - Use
../workflow-patterns/SKILL.mdfor routers, orchestrators, parallel workflows, evaluator loops, and durable workflow composition.
Bundled Helpers
python scripts/check_observability_config.py --config mcp_agent.config.yaml --json
python scripts/summarize_event_log.py logs/mcp-agent.jsonl --limit 50 --json
Both helpers are self-contained and credential-safe. They do not import provider SDKs, contact external collectors, replay interactive displays, or require the original source repository.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.