Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

695 B
Raw Blame
import { fn } from 'storybook/test';

/**
 * Replaces `api/common/logEvent` in Storybook (aliased in `.storybook/main.ts`)
 * so analytics never leave the iframe. Stories can assert on the calls:
 * `import logEvent from 'api/common/logEvent'` then `expect(logEvent)...`.
 *
 * The annotation checks the module's shape against the real one, so a change to
 * `logEvent`'s signature fails to compile here rather than at render.
 */
const libLogEvent: typeof import('api/common/logEvent') = {
	default: fn(async () => ({
		statusCode: 200 as const,
		error: null,
		message: 'success',
		payload: { status: 'success', data: '' },
	})).mockName('logEvent'),
};

export default libLogEvent.default;