@dudousxd/nestjs-telescope
Version:
Laravel Telescope-style observability console for NestJS — core: watchers, recorder, correlation, SQLite store, headless API.
37 lines • 1.45 kB
JavaScript
// packages/core/src/entry/entry.ts
export const EntryType = {
Request: 'request',
Query: 'query',
Job: 'job',
Exception: 'exception',
Mail: 'mail',
Cache: 'cache',
HttpClient: 'http_client',
Dump: 'dump',
Event: 'event',
Log: 'log',
Model: 'model',
Redis: 'redis',
Inertia: 'inertia',
/**
* A browser-reported error ingested via the public `POST /api/client-errors`
* endpoint. Distinct from a server `Exception` (which the interceptor captures
* in-process) so the dashboard, sampling, prune and archive can treat
* front-end errors as their own stream — yet it carries the SAME `failed`/
* `client`/`user:<id>` tags and a family-hash so the `new-exception` alert and
* the exception groupings compose over both.
*/
ClientException: 'client_exception',
/**
* An on-demand CPU flamegraph capture, recorded by the opt-in profiler around a
* sampled/triggered request. Its `content` is the AGGREGATED frame tree (see
* {@link CpuProfileContent}), not the raw `.cpuprofile` — keeping the entry body
* bounded. Associated to its request by `batchId`/`traceId` like any entry.
*/
CpuProfile: 'cpu_profile',
};
const BATCH_ORIGINS = ['http', 'queue', 'schedule', 'cli', 'manual'];
export function isBatchOrigin(value) {
return typeof value === 'string' && BATCH_ORIGINS.includes(value);
}
//# sourceMappingURL=entry.js.map