Skip to content

metrics backend for swift-metrics that uses the statsd protocol

License

Notifications You must be signed in to change notification settings

mr-swifter/swift-statsd-client

 
 

Repository files navigation

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

About

metrics backend for swift-metrics that uses the statsd protocol

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 73.4%
  • Shell 13.4%
  • Ruby 10.8%
  • Dockerfile 2.4%