@azure/monitor-opentelemetry
Version:
Azure Monitor OpenTelemetry (Node.js)
18 lines • 891 B
TypeScript
/**
* Eagerly installs the OpenTelemetry bridge for \@azure/core-tracing.
*
* The \@azure/opentelemetry-instrumentation-azure-sdk package normally installs
* the bridge via a require-in-the-middle (RITM) hook that intercepts future
* `require("@azure/core-tracing")` calls. However, if \@azure/core-tracing is
* already loaded before useAzureMonitor() is called (e.g. because the customer
* imported \@azure/ai-projects or any other Azure SDK package first), the hook
* never fires, and Azure SDK spans are silently dropped.
*
* This function works around the issue by directly calling useInstrumenter()
* with an instrumenter created via createOpenTelemetryInstrumenter(), which
* patches the already-loaded \@azure/core-tracing singleton state.
*
* @internal
*/
export declare function ensureAzureSdkTracingBridge(): void;
//# sourceMappingURL=azureSdkTracingBridge.d.ts.map