Skip to content

Commit

Permalink
Merge pull request #143 from topfreegames/metrics-docs
Browse files Browse the repository at this point in the history
Improve metrics documentation
  • Loading branch information
leohahn committed Sep 23, 2020
2 parents 42f40cc + bb92de7 commit 2e8d171
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,28 @@ This module implements functionality needed by the gRPC RPC implementation to en

Pitaya has support for metrics reporting, it comes with Prometheus and Statsd support already implemented and has support for custom reporters that implement the `Reporter` interface. Pitaya also comes with support for open tracing compatible frameworks, allowing the easy integration of Jaeger and others.

Some of the reported metrics reported by the `Reporter` include: number of connected clients, request duration and dropped messages.

## Custom Metrics
The list of metrics reported by the `Reporter` is:

- Response time: the time to process a message, in nanoseconds. It is segmented
by route, status, server type and response code;
- Process delay time: the delay to start processing a message, in nanoseconds;
It is segmented by route and server type;
- Exceeded Rate Limit: the number of blocked requests by exceeded rate limiting;
- Connected clients: number of clients connected at the moment;
- Server count: the number of discovered servers by service discovery. It is
segmented by server type;
- Channel capacity: the available capacity of the channel;
- Dropped messages: the number of rpc server dropped messages, that is, messages that are not handled;
- Goroutines count: the current number Goroutines;
- Heap size: the current heap size;
- Heap objects count: the current number of objects at the heap;
- Worker jobs retry: the current amount of RPC reliability worker job retries;
- Worker jobs total: the current amount of RPC reliability worker jobs. It is
segmented by job status;
- Worker queue size: the current size of RPC reliability worker job queues. It
is segmented by each available queue.

### Custom Metrics

Besides pitaya default monitoring, it is possible to create new metrics. If using only Statsd reporter, no configuration is needed. If using Prometheus, it is necessary do add a configuration specifying the metrics parameters. More details on [doc](configuration.html#metrics-reporting) and this [example](https://github.com/topfreegames/pitaya/tree/master/examples/demo/custom_metrics).

Expand Down

0 comments on commit 2e8d171

Please sign in to comment.