You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* DocC setup
* Fix build in newer Swift versions
* Rename docc directory
* Package manifest for old Swift versions rather than new
* Add more API to topics
* Add preview DocC script
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,36 +1,36 @@
1
1
# SwiftStatsDClient
2
2
3
3
a metrics backend for [swift-metrics](https://github.com/apple/swift-metrics) that uses the [statsd](https://github.com/b/statsd_spec) protocol, and can be used to integrate applications with observability solutions that support `statsd` including:
create an instance of the `StatsdClient` and boostrap the `MetricsSystem` in your application's main:
14
+
Create an instance of the `StatsdClient` and boostrap the `MetricsSystem` in your application's `main`:
15
15
16
16
```swift
17
17
let statsdClient =tryStatsdClient(host: host, port: port)
18
18
MetricsSystem.bootstrap(statsdClient)
19
19
```
20
20
21
-
see https://github.com/apple/swift-metrics#selecting-a-metrics-backend-implementation-applications-only
21
+
See [selecting a metrics backend implementation](https://github.com/apple/swift-metrics#selecting-a-metrics-backend-implementation-applications-only) for more information.
22
22
23
-
remeber to also shutdown the client before you application terminates:
23
+
Remember to also shutdown the client before you application terminates:
24
24
25
25
```swift
26
26
statsdClient.shutdown()
27
27
```
28
28
29
29
## Architecture
30
30
31
-
the statsd client uses [swift-nio](https://github.com/apple/swift-nio) to establish a UDP connection to the statsd server
31
+
`StatsdClient`uses [SwiftNIO](https://github.com/apple/swift-nio) to establish a UDP connection to the `statsd` server.
A metrics backend implementation using the StatsD protocol.
4
+
5
+
## Overview
6
+
7
+
StatsdClient is a metrics backend for [SwiftMetrics](https://github.com/apple/swift-metrics) that uses the [StatsD](https://github.com/b/statsd_spec) protocol, and can be used to integrate applications with observability solutions that support StatsD including:
Create an instance of the ``StatsdClient/StatsdClient`` and boostrap the `MetricsSystem` in your application's `main`:
19
+
20
+
```swift
21
+
let statsdClient =tryStatsdClient(host: host, port: port)
22
+
MetricsSystem.bootstrap(statsdClient)
23
+
```
24
+
25
+
See [selecting a metrics backend implementation](https://github.com/apple/swift-metrics#selecting-a-metrics-backend-implementation-applications-only) for more information.
26
+
27
+
Remember to also shutdown the client before you application terminates:
28
+
29
+
```swift
30
+
statsdClient.shutdown()
31
+
```
32
+
33
+
## Architecture
34
+
35
+
``StatsdClient/StatsdClient`` uses [SwiftNIO](https://github.com/apple/swift-nio) to establish a UDP connection to the `statsd` server.
/// Shutdown the client. This is a noop when using a `shared` `EventLoopGroupProvider` strategy.
45
+
/// Shutdown the client. This is a noop when using the ``EventLoopGroupProvider/shared(_:)`` strategy.
46
46
///
47
-
/// - Note: It is required to call `shutdown` before terminating the program. `StatsdClient` client will assert it was cleanly shut down as part of it destructor.
47
+
/// - Note: It is required to call this method before terminating the program. `StatsdClient` will assert it was cleanly shut down as part of its destructor.
48
48
///
49
-
/// - parameters:
50
-
/// - callback: A caalback for when shutdown is complete
49
+
/// - Parameters:
50
+
/// - callback: A callback for when shutdown is complete.
0 commit comments