MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / tool_spans

Function tool_spans

tests/lib/tools/test_open_telemetry.py:299–300  ·  view source on GitHub ↗
(spans: Spans)

Source from the content-addressed store, hash-verified

297
298
299def tool_spans(spans: Spans) -> list[ReadableSpan]:
300 return [span for span in spans.finished if attributes(span).get("gen_ai.operation.name") == "execute_tool"]
301
302
303class TestToolRunnerSpans:

Calls 2

attributesFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected