18 lines
527 B
TypeScript
18 lines
527 B
TypeScript
import type { IObservabilityAdapter } from './types';
|
|
|
|
/**
|
|
* No-Op Observability Adapter.
|
|
*
|
|
* Default adapter when no telemetry is configured.
|
|
* All methods are empty — V8's TurboFan JIT compiler will inline
|
|
* and dead-code-eliminate these calls during optimization,
|
|
* resulting in effectively ZERO runtime overhead.
|
|
*
|
|
* Used by apps that don't need APM (e.g., `apps/landing`).
|
|
*/
|
|
export const noopObservabilityAdapter: IObservabilityAdapter = {
|
|
onRequestStart() {},
|
|
onRequestEnd() {},
|
|
onRequestError() {},
|
|
};
|