refine Function

Produce metric points from a one or more application events and an optional context.

Signature

refine(
  state: MetricState,
  events: Array.<ApplicationEvent>,
  context: Any?
)
-> MetricState

Return Values

nextState
MetricState

The advanced state of the adapter which you can feed to a future call to this routine.

nextState.metrics
Array.<Metric>

The metrics in their advanced states after having (possibly) consumed the events and produced their points.

nextState.points
Array.<MetricPoint>

The list of metric points you probably want to submit to your analytics service.

nextState.context
Any

The advanced context after having gone through all the metric constraints.

Type Definitions

    ApplicationEvent

    Properties

    name: String
    data: Any?

    MetricPoint

    Properties

    name: String
    data: Array.<DataPoint>
    source: Object
    source.event: ApplicationEvent
    source.data: Object?