@arizeai/phoenix-client
Version:
A client for the Phoenix API
21 lines • 541 B
JavaScript
/**
* Flushes and shuts down a tracer provider that this package created, then
* detaches any global OTEL registration it owns so another provider can be mounted.
*/
export async function cleanupOwnedTracerProvider({ provider, globalRegistration, }) {
if (!provider) {
return;
}
try {
await provider.forceFlush();
}
finally {
try {
await provider.shutdown();
}
finally {
globalRegistration?.detach();
}
}
}
//# sourceMappingURL=tracing.js.map