Swiftpack.co - apple/swift-statsd-client as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by apple.
apple/swift-statsd-client 1.0.0
metrics backend for swift-metrics that uses the statsd protocol
⭐️ 48
🕓 43 weeks ago
.package(url: "https://github.com/apple/swift-statsd-client.git", from: "1.0.0")


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 MetricsSystem in your application's main:

let statsdClient = try StatsdClient(host: host, port: port)

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

remeber to also shutdown the client before you application terminates:



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


Please see SECURITY.md for details on the security process.

Getting involved

Do not hesitate to get in touch as well, over on https://forums.swift.org/c/server


Stars: 48
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1.0.0 release
43 weeks ago

First 1.0 release

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics