RecorderHandler

public protocol RecorderHandler : AnyObject

A RecorderHandler represents a backend implementation of a Recorder.

This type is an implementation detail and should not be used directly, unless implementing your own metrics backend. To use the SwiftMetrics API, please refer to the documentation of Recorder.

Implementation requirements

To implement your own RecorderHandler you should respect a few requirements that are necessary so applications work as expected regardless of the selected RecorderHandler implementation.

  • The RecorderHandler must be a class.
  • Record a value.

    Declaration

    Swift

    func record(_ value: Int64)

    Parameters

    value

    Value to record.

  • Record a value.

    Declaration

    Swift

    func record(_ value: Double)

    Parameters

    value

    Value to record.