15 lines
424 B
TypeScript
15 lines
424 B
TypeScript
export type ObservabilityDiagnostic = (message: string, error: unknown) => void;
|
|
|
|
/** Report exporter failures without feeding them back through the exporter. */
|
|
export function reportObservabilityFailure(
|
|
message: string,
|
|
error: unknown,
|
|
diagnostic?: ObservabilityDiagnostic,
|
|
): void {
|
|
if (diagnostic) {
|
|
diagnostic(message, error);
|
|
return;
|
|
}
|
|
console.warn(`[wrnexus:observability] ${message}`, error);
|
|
}
|