Options
All
  • Public
  • Public/Protected
  • All
Menu

Module core/metrics/types/labeled

Index

Variables

OTHER_LABEL

OTHER_LABEL: "__other__" = "__other__"

Functions

combineIdentifierAndLabel

  • combineIdentifierAndLabel(metricName: string, label: string): string
  • Combines a metric's base identifier and label.

    Parameters

    • metricName: string

      the metric base identifier

    • label: string

      the label

    Returns string

    a string representing the complete metric id including the label.

getValidDynamicLabel

  • getValidDynamicLabel(metric: MetricType): Promise<string>
  • Checks if the dynamic label stored in the metric data is valid. If not, record an error and store data in the "other" label.

    Parameters

    Returns Promise<string>

    a valid label that can be used to store data.

stripLabel

  • stripLabel(identifier: string): string
  • Strips the label from a metric identifier.

    This is a no-op in case the identifier does not contain a label.

    Parameters

    • identifier: string

      The identifier to strip a label from.

    Returns string

    The identifier without the label.

Generated using TypeDoc