Library Moduleswift-statsd-client 1.1.0StatsdClient

StatsdClient

A metrics backend implementation using the StatsD protocol.

index.md
import StatsdClient

Module information

Declarations
16
Symbols
18

Coverage

37.5 percent of the declarations in StatsdClient are fully documented62.5 percent of the declarations in StatsdClient are indirectly documented

Declarations

25.0 percent of the declarations in StatsdClient are initializers, type members, or enum cases56.3 percent of the declarations in StatsdClient are instance members6.3 percent of the declarations in StatsdClient are structures6.3 percent of the declarations in StatsdClient are classes6.3 percent of the declarations in StatsdClient are typealiases

Interfaces

100.0 percent of the declarations in StatsdClient are unrestricted
Module stats and coverage details

Overview

StatsdClient is a metrics backend for SwiftMetrics that uses the StatsD protocol, and can be used to integrate applications with observability solutions that support StatsD including:

Getting started

Create an instance of the StatsdClient and boostrap the MetricsSystem in your application’s main:

let statsdClient = try StatsdClient(host: host, port: port)
MetricsSystem.bootstrap(statsdClient)

See selecting a metrics backend implementation for more information.

Remember to also shutdown the client before you application terminates:

statsdClient.shutdown()

Architecture

StatsdClient uses SwiftNIO to establish a UDP connection to the statsd server.

Metrics types are mapped as following:

  • Counter -> Counter

  • Gauge -> Gauge

  • Recorder -> Histogram

  • Timer -> Timer

Client API

Metrics API

Uncategorized

Types

  • class StatsdClient

    StatsdClient is a metrics backend for SwiftMetrics, designed to integrate applications with observability servers that support statsd protocol. The client uses SwiftNIO to establish a UDP connection to the statsd server.