mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 04:54:17 +02:00
Tracer.start_span builds the span from sampling_result.attributes, not the attributes kwarg — a custom Sampler that returns SamplingResult(RECORD_AND_SAMPLE) without forwarding attributes silently drops everything FastMCP passed at creation time. Reapply the same attributes immediately after span creation (guarded by is_recording()) so on_start hooks and samplers still see them, while the finished span is guaranteed to carry FastMCP's telemetry regardless of sampler behavior. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_delegate_method.py | ||
| test_list_tracing.py | ||
| test_provider_tracing.py | ||
| test_sampling_tracing.py | ||
| test_server_tracing.py | ||