Skip to content
metrics backend for swift-metrics that uses the statsd protocol
Swift Ruby Shell Dockerfile
Branch: master
Clone or download
tomerd and ktoso swift 5.1 docker setup
motivation: support swift 5.1

changes:
* add docker compose file for swift 5.1, will add CI job once merged
* update swift-format version to 0.40.12
Latest commit 2bca6dd Sep 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sources/StatsdClient add docker setup and CI scripts Aug 21, 2019
Tests add docker setup and CI scripts Aug 21, 2019
docker swift 5.1 docker setup Sep 24, 2019
scripts add docker setup and CI scripts Aug 21, 2019
.gitignore initial commit Jun 2, 2019
.mailmap
.swiftformat
CODE_OF_CONDUCT.md update conduct email address Sep 7, 2019
CONTRIBUTORS.txt
LICENSE.txt initial commit Jun 2, 2019
Package.swift add docker setup and CI scripts Aug 21, 2019
README.md

README.md

swift-statsd-client

a metrics backend for swift-metrics 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 MertricsSystem in your application's main:

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

see https://github.com/apple/swift-metrics#selecting-a-metrics-backend-implementation-applications-only

remeber to also shutdown the client before you application terminates:

statsdClient.shutdown()

architecture

the statsd client uses swift-nio to establish a UDP connection to the statsd server

metrics types are mapped as follwoing:

  • Counter -> Counter
  • Gauge -> Gauge
  • Recorder -> Histogram
  • Timer -> Timer
You can’t perform that action at this time.