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

Method handler

tests/test_open_telemetry.py:2581–2584  ·  view source on GitHub ↗
(_request: httpx2.Request)

Source from the content-addressed store, hash-verified

2579 tracer = spans.provider.get_tracer("app")
2580
2581 def handler(_request: httpx2.Request) -> httpx2.Response:
2582 # What an application's transport, event hook or HTTP instrumentation does while the SDK sends.
2583 with tracer.start_as_current_span("app.transport"):
2584 return httpx2.Response(200, json=MESSAGE)
2585
2586 if sync:
2587 client = make_client(spans, http_client=httpx2.Client(transport=httpx2.MockTransport(handler)))

Callers

nothing calls this directly

Calls 1

start_as_current_spanMethod · 0.80

Tested by

no test coverage detected