Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Methods

  • record(metric: MetricType, error: ErrorType, message: unknown, numErrors?: number): Promise<void>
  • Records an error into Glean.

    Errors are recorded as labeled counters in the glean.error category.

    Parameters

    • metric: MetricType

      The metric to record an error for.

    • error: ErrorType

      The error type to record.

    • message: unknown

      The message to log. This message is not sent with the ping. It does not need to include the metric id, as that is automatically prepended to the message.

    • numErrors: number = 1

      The number of errors of the same type to report.

    Returns Promise<void>

  • Gets the number of recorded errors for the given metric and error type.

    Parameters

    • metric: MetricType

      The metric to get the number of errors for.

    • error: ErrorType

      The error type to get count of.

    • Optional ping: string

      The ping from which we want to retrieve the number of recorded errors. Defaults to the first value in sendInPings.

    Returns Promise<number>

    The number of errors reported.

Generated using TypeDoc