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

Class TracingFlightServer

python/pyarrow/tests/test_flight.py:2657–2666  ·  view source on GitHub ↗

A server that echoes back trace context values.

Source from the content-addressed store, hash-verified

2655
2656
2657class TracingFlightServer(FlightServerBase):
2658 """A server that echoes back trace context values."""
2659
2660 def do_action(self, context, action):
2661 trace_context = context.get_middleware("tracing").trace_context
2662 # Don't turn this method into a generator since then
2663 # trace_context will be evaluated after we've exited the scope
2664 # of the OTel span (and so the value we want won't be present)
2665 return ((f"{key}: {value}").encode("utf-8")
2666 for (key, value) in trace_context.items())
2667
2668
2669def test_tracing():

Callers 1

test_tracingFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_tracingFunction · 0.68