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

Function InitializeSdkTracerProvider

cpp/src/arrow/util/tracing_internal.cc:157–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157nostd::shared_ptr<sdktrace::TracerProvider> InitializeSdkTracerProvider() {
158 // Bind the lifetime of the OT runtime context to the CPU and I/O thread
159 // pools. This will keep OT alive until all thread tasks have finished.
160 internal::GetCpuThreadPool()->KeepAlive(GetStorageSingleton());
161 io::default_io_context().executor()->KeepAlive(GetStorageSingleton());
162 auto exporter = InitializeExporter();
163 if (exporter) {
164 sdktrace::BatchSpanProcessorOptions options;
165 options.max_queue_size = 16384;
166 options.schedule_delay_millis = std::chrono::milliseconds(500);
167 options.max_export_batch_size = 16384;
168 auto processor =
169 std::make_unique<ThreadIdSpanProcessor>(std::move(exporter), options);
170 return std::make_shared<sdktrace::TracerProvider>(std::move(processor));
171 }
172 return nostd::shared_ptr<sdktrace::TracerProvider>();
173}
174
175class FlushLog {
176 public:

Callers 1

GetSdkTracerProviderFunction · 0.85

Calls 5

GetCpuThreadPoolFunction · 0.85
GetStorageSingletonFunction · 0.85
InitializeExporterFunction · 0.85
KeepAliveMethod · 0.80
executorMethod · 0.45

Tested by

no test coverage detected