Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface View

Package version

Defines how individual measurements are broken down by tags and aggregated.

Hierarchy

  • View

Index

Properties

aggregation

aggregation: AggregationType

An Aggregation describes how data collected is aggregated. There are four aggregation types: count, sum, lastValue and distirbution.

description

description: string

Describes the view, e.g. "RPC latency distribution"

Optional endTime

endTime: undefined | number

The end time for this view - represents the last time a value was recorded

measure

measure: Measure

The Measure to which this view is applied.

name

name: string

A string by which the View will be referred to, e.g. "rpc_latency". Names MUST be unique within the library.

registered

registered: boolean

true if the view was registered

startTime

startTime: number

The start time for this view

Methods

getColumns

  • Gets the view's tag keys

    Returns TagKey[]

getMetric

  • getMetric(start: number): Metric
  • Gets view`s metric

    Parameters

    • start: number

    Returns Metric

getSnapshot

  • Returns a snapshot of an AggregationData for that tags/labels values.

    Parameters

    • tagValues: Array<TagValue | null>

      The desired data's tag values.

    Returns AggregationData

recordMeasurement

  • recordMeasurement(measurement: Measurement, tags: TagMap, attachments?: undefined | object): void
  • Records a measurement in the proper view's row. This method is used by Stats. User should prefer using Stats.record() instead.

    Measurements with measurement type INT64 will have its value truncated.

    Parameters

    • measurement: Measurement

      The measurement to record

    • tags: TagMap

      The tags to which the value is applied

    • Optional attachments: undefined | object

      optional The contextual information associated with an example value. THe contextual information is represented as key - value string pairs.

    Returns void

Generated using TypeDoc