MCPcopy Create free account
hub / github.com/anus-dev/ANUS / logFlashFallback

Function logFlashFallback

packages/core/src/telemetry/loggers.ts:174–194  ·  view source on GitHub ↗
(
  config: Config,
  event: FlashFallbackEvent,
)

Source from the content-addressed store, hash-verified

172}
173
174export function logFlashFallback(
175 config: Config,
176 event: FlashFallbackEvent,
177): void {
178 ClearcutLogger.getInstance(config)?.logFlashFallbackEvent(event);
179 if (!isTelemetrySdkInitialized()) return;
180
181 const attributes: LogAttributes = {
182 ...getCommonAttributes(config),
183 ...event,
184 'event.name': EVENT_FLASH_FALLBACK,
185 'event.timestamp': new Date().toISOString(),
186 };
187
188 const logger = logs.getLogger(SERVICE_NAME);
189 const logRecord: LogRecord = {
190 body: `Switching to flash as Fallback.`,
191 attributes,
192 };
193 logger.emit(logRecord);
194}
195
196export function logApiError(config: Config, event: ApiErrorEvent): void {
197 const uiEvent = {

Callers 2

loggers.test.tsFile · 0.85
flashFallbackHandlerFunction · 0.85

Calls 4

logFlashFallbackEventMethod · 0.80
getCommonAttributesFunction · 0.70
getInstanceMethod · 0.45

Tested by

no test coverage detected