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
Copy file name to clipboardExpand all lines: README.md
+14-18Lines changed: 14 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,27 @@
1
-
go-metrics
2
-
==========
1
+
# go-metrics
3
2
4
3
This library provides a `metrics` package which can be used to instrument code,
5
4
expose application metrics, and profile runtime performance in a flexible manner.
6
5
7
-
Current API: [](https://godoc.org/github.com/armon/go-metrics)
6
+
Current API: [](https://godoc.org/github.com/rogueloop/go-metrics)
8
7
9
-
Sinks
10
-
-----
8
+
## Sinks
11
9
12
10
The `metrics` package makes use of a `MetricSink` interface to support delivery
13
11
to any type of backend. Currently the following sinks are provided:
14
12
15
-
* StatsiteSink : Sinks to a [statsite](https://github.com/armon/statsite/) instance (TCP)
16
-
* StatsdSink: Sinks to a [StatsD](https://github.com/etsy/statsd/) / statsite instance (UDP)
17
-
* PrometheusSink: Sinks to a [Prometheus](http://prometheus.io/) metrics endpoint (exposed via HTTP for scrapes)
18
-
* InmemSink : Provides in-memory aggregation, can be used to export stats
19
-
* FanoutSink : Sinks to multiple sinks. Enables writing to multiple statsite instances for example.
20
-
* BlackholeSink : Sinks to nowhere
13
+
- StatsiteSink : Sinks to a [statsite](https://github.com/rogueloop/statsite/) instance (TCP)
14
+
- StatsdSink: Sinks to a [StatsD](https://github.com/etsy/statsd/) / statsite instance (UDP)
15
+
- PrometheusSink: Sinks to a [Prometheus](http://prometheus.io/) metrics endpoint (exposed via HTTP for scrapes)
16
+
- InmemSink : Provides in-memory aggregation, can be used to export stats
17
+
- FanoutSink : Sinks to multiple sinks. Enables writing to multiple statsite instances for example.
18
+
- BlackholeSink : Sinks to nowhere
21
19
22
20
In addition to the sinks, the `InmemSignal` can be used to catch a signal,
23
21
and dump a formatted output of recent metrics. For example, when a process gets
24
22
a SIGUSR1, it can dump to stderr recent performance metrics for debugging.
25
23
26
-
Labels
27
-
------
24
+
## Labels
28
25
29
26
Most metrics do have an equivalent ending with `WithLabels`, such methods
30
27
allow to push metrics with labels and use some features of underlying Sinks
@@ -34,15 +31,14 @@ Since some of these labels may increase greatly cardinality of metrics, the
34
31
library allow to filter labels using a blacklist/whitelist filtering system
35
32
which is global to all metrics.
36
33
37
-
* If `Config.AllowedLabels` is not nil, then only labels specified in this value will be sent to underlying Sink, otherwise, all labels are sent by default.
38
-
* If `Config.BlockedLabels` is not nil, any label specified in this value will not be sent to underlying Sinks.
34
+
- If `Config.AllowedLabels` is not nil, then only labels specified in this value will be sent to underlying Sink, otherwise, all labels are sent by default.
35
+
- If `Config.BlockedLabels` is not nil, any label specified in this value will not be sent to underlying Sinks.
39
36
40
37
By default, both `Config.AllowedLabels` and `Config.BlockedLabels` are nil, meaning that
41
38
no tags are filetered at all, but it allow to a user to globally block some tags with high
42
39
cardinality at application level.
43
40
44
-
Examples
45
-
--------
41
+
## Examples
46
42
47
43
Here is an example of using the package:
48
44
@@ -88,4 +84,4 @@ When a signal comes in, output like the following will be dumped to stderr:
0 commit comments