@prismshadow/penguin-library-observability · library/observability/src/observability.ts:343

ErrorLog

interface

ErrorLog: the mechanism ErrorsRepo implements.

API

@Interface()
export abstract class ErrorLog {
  abstract insert(r: ErrorRecordInsert): void;
  abstract summary(projectId: string, f?: ErrorFilter): ErrorSummary;
  abstract topCode(projectId: string, f?: ErrorFilter): ErrorCodeCount | null;
  abstract recent(
      projectId: string,
      f?: ErrorFilter,
      limit?: number,
      offset?: number,
      utcOffsetMinutes?: number,
    ): ErrorItem[];
  abstract rowCount(projectId: string, f?: ErrorFilter, utcOffsetMinutes?: number): number;
  abstract deleteFiltered(projectId: string, f?: Omit<ErrorFilter, "includeGlobal">): number;
  abstract deleteByAgent(projectId: string, agentId: string): void;
  abstract deleteByProject(projectId: string): void;
}

Contract Topology

Static AST wiring across @Module / @Provide / @Use

Members (8)

insert

insert(r: ErrorRecordInsert): void
@paramrErrorRecordInsert
@returnsvoid

summary

summary(projectId: string, f?: ErrorFilter): ErrorSummary
@paramprojectIdstring
@paramf?ErrorFilter
@returnsErrorSummary

topCode

topCode(projectId: string, f?: ErrorFilter): ErrorCodeCount | null
@paramprojectIdstring
@paramf?ErrorFilter
@returnsErrorCodeCount | null

recent

recent(projectId: string, f?: ErrorFilter, limit?: number, offset?: number, utcOffsetMinutes?: number): ErrorItem[]
@paramprojectIdstring
@paramf?ErrorFilter
@paramlimit?number
@paramoffset?number
@paramutcOffsetMinutes?number
@returnsErrorItem[]

rowCount

rowCount(projectId: string, f?: ErrorFilter, utcOffsetMinutes?: number): number
@paramprojectIdstring
@paramf?ErrorFilter
@paramutcOffsetMinutes?number
@returnsnumber

deleteFiltered

deleteFiltered(projectId: string, f?: Omit<ErrorFilter, "includeGlobal">): number
@paramprojectIdstring
@paramf?Omit<ErrorFilter, "includeGlobal">
@returnsnumber

deleteByAgent

deleteByAgent(projectId: string, agentId: string): void
@paramprojectIdstring
@paramagentIdstring
@returnsvoid

deleteByProject

deleteByProject(projectId: string): void
@paramprojectIdstring
@returnsvoid