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

Function PropagateSpanThroughAsyncGenerator

cpp/src/arrow/util/tracing_internal.h:91–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89/// \brief Propagate the given span to each invocation of an async generator.
90template <typename T>
91AsyncGenerator<T> PropagateSpanThroughAsyncGenerator(
92 AsyncGenerator<T> wrapped,
93 opentelemetry::nostd::shared_ptr<opentelemetry::trace::Span> span) {
94 return [=]() mutable -> Future<T> {
95 auto scope = GetTracer()->WithActiveSpan(span);
96 return wrapped();
97 };
98}
99
100/// \brief Propagate the currently active span to each invocation of an async generator.
101///

Callers

nothing calls this directly

Calls 3

GetTracerFunction · 0.85
IsValidMethod · 0.45
GetContextMethod · 0.45

Tested by

no test coverage detected