Skip to content

Commit

Permalink
adjusts protocol and fixes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
eabili0 committed Jan 28, 2020
1 parent bd85171 commit 2397f8b
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,27 @@ More specifically, the **Big Brother** app federates it's own monitoring cluster

These metrics are treated as the fundamental protocol behind **Big Brother's** capabilities.

## Big Brother Metric Protocol

A valid **Big Brother** library should expose the following metrics:

```
request_seconds_bucket{type, status, isError, method, addr, version, le}
request_seconds_count{type, status, isError, method, version, addr}
request_seconds_sum{type, status, isError, method, version, addr}
response_size_bytes{type, status, isError, method, version, addr}
request_seconds_bucket{type, status, isError, method, addr, le}
request_seconds_count{type, status, isError, method, addr}
request_seconds_sum{type, status, isError, method, addr}
response_size_bytes{type, status, isError, method, addr}
dependency_up{name}
application_info{version}
```

In detail:

1. The `request_seconds_bucket` metric defines the histogram of how many requests are falling into the well defined buckets represented by the label `le`;
2. The `request_seconds_count` is a counter that counts the overall number of requests with those exact label occurrences;
3. The `request_seconds_sum` is a counter that counts the overall sum of how long the requests with those exact label occurrences are taking;
4. The `response_size_bytes` is a counter that computes how much data is being sent back to the user for a given request type. It captures the response size from the `content-length` response header. If there is no such header, the value exposed as metric will be zero;
5. Finally, `dependency_up` is a metric to register weather a specific dependency is up (1) or down (0). The label `name` registers the dependency name;
1. `request_seconds_bucket` is a metric that defines the histogram of how many requests are falling into the well defined buckets represented by the label `le`;
2. `request_seconds_count` is a counter that counts the overall number of requests with those exact label occurrences;
3. `request_seconds_sum` is a counter that counts the overall sum of how long the requests with those exact label occurrences are taking;
4. `response_size_bytes` is a counter that computes how much data is being sent back to the user for a given request type. It captures the response size from the `content-length` response header. If there is no such header, the value exposed as metric will be zero;
5. `dependency_up` is a metric to register weather a specific dependency is up (1) or down (0). The label `name` registers the dependency name;
6. Finally, `application_info` holds static info of an application, such as it's semantic version number;

## Labels

Expand All @@ -44,10 +48,11 @@ For a specific request:

The following libraries make part of **Big Brother** official libraries:

1. [`express-monitor`](https://github.com/labbsr0x/express-monitor) for the Node JS Express framework.
2. [`servlet-monitor`](https://github.com/labbsr0x/servlet-monitor) for the Java ecosystem
3. [TODO] `iris-monitor` for the Katara's Iris web framework;
4. [TODO] `mux-monitor` for the Gorilla's Mux web framework;
1. [`express-monitor`](https://github.com/labbsr0x/express-monitor) for Node JS Express apps;
2. [`servlet-monitor`](https://github.com/labbsr0x/servlet-monitor) for Java Servlets apps;
3. [`flask-monitor`](https://github.com/labbsr0x/flask-monitor) for Python Flask apps;
4. [TODO] `iris-monitor` for Golang Iris apps;
5. [TODO] `mux-monitor` for the Golang Mux apps;

Without these, you would have to expose the metrics by yourself, possibly leading to inconsistencies and other errors when setting up your app's observability infrastructure with **Big Brother**.

Expand Down

0 comments on commit 2397f8b

Please sign in to comment.