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.1
metrics backend for swift-metrics that uses the statsd protocol
⭐️ 55
🕓 1 year ago
.package(url: "https://github.com/apple/swift-statsd-client.git", from: "1.0.1")

SwiftStatsDClient

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)
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

Security

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

GitHub

link
Stars: 55
Last commit: 12 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1.0.1 Release
1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/apple/swift-statsd-client/compare/1.0.0...1.0.1

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