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

Method handler

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

Source from the content-addressed store, hash-verified

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

Callers 2

handle_requestMethod · 0.45
handle_async_requestMethod · 0.45

Calls 1

start_as_current_spanMethod · 0.80

Tested by

no test coverage detected