MCPcopy Create free account
hub / github.com/apache/arrow / TracingFlightServer

Class TracingFlightServer

python/pyarrow/tests/test_flight.py:2619–2628  ·  view source on GitHub ↗

A server that echoes back trace context values.

Source from the content-addressed store, hash-verified

2617
2618
2619class TracingFlightServer(FlightServerBase):
2620 """A server that echoes back trace context values."""
2621
2622 def do_action(self, context, action):
2623 trace_context = context.get_middleware("tracing").trace_context
2624 # Don't turn this method into a generator since then
2625 # trace_context will be evaluated after we've exited the scope
2626 # of the OTel span (and so the value we want won't be present)
2627 return ((f"{key}: {value}").encode("utf-8")
2628 for (key, value) in trace_context.items())
2629
2630
2631def test_tracing():

Callers 1

test_tracingFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_tracingFunction · 0.68