MCPcopy Create free account
hub / github.com/encode/starlette / get_span

Function get_span

tests/middleware/test_opentelemetry.py:38–41  ·  view source on GitHub ↗
(exporter: InMemorySpanExporter)

Source from the content-addressed store, hash-verified

36
37
38def get_span(exporter: InMemorySpanExporter) -> ReadableSpan:
39 spans = exporter.get_finished_spans()
40 assert len(spans) == 1
41 return spans[0]
42
43
44def homepage(request: Request) -> PlainTextResponse:

Calls

no outgoing calls

Tested by

no test coverage detected