mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-24 22:44:17 +02:00
Add OTEL tracing to the sampling pipeline: - `sampling/createMessage` span wrapping sample_impl() with attributes for temperature, max_tokens, tool_count, result_type, and iteration count - `sampling/createMessage step` child spans per loop iteration with iteration index and stop reason - `sampling.execute_tool <name>` spans for tool calls within sampling, including error status on failures - Validation failure and text response retry events on the parent span - Opt-in content capture via OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT Also adds is_recording() guards to server_span, delegate_span, and client_span to avoid unnecessary attribute serialization when sampling is disabled, and sets error.type using __qualname__ for better nested class names. Closes #3891 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| apps | ||
| cli | ||
| client | ||
| conformance | ||
| contrib | ||
| deprecated | ||
| docs | ||
| experimental | ||
| fs | ||
| integration_tests | ||
| prompts | ||
| resources | ||
| server | ||
| telemetry | ||
| tools | ||
| utilities | ||
| __init__.py | ||
| conftest.py | ||
| test_apps.py | ||
| test_apps_prefab.py | ||
| test_fastmcp_app.py | ||
| test_json_schema_generation.py | ||
| test_mcp_config.py | ||