Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit f0c6a42

Browse files
Ramon NogueiraBogdan Drutu
authored andcommitted
Update gRPC & HTTP stats (#82)
* Update gRPC stats * Update HTTP stats
1 parent a909b52 commit f0c6a42

2 files changed

Lines changed: 113 additions & 106 deletions

File tree

stats/HTTP.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
Any particular library might provide only a subset of these measures/views/tags.
44
Check the language-specific documentation for the list of supported values.
55

6-
There is no special support for multi-part HTTP requests and responses. These are just treated as one request.
6+
There is no special support for multi-part HTTP requests and responses. These are just treated as a single request.
77

88
## Units
99

10-
Units are encoded according to the case-sensitive abbreviations from the [Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html):
10+
As always, units are encoded according to the case-sensitive abbreviations from the [Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html):
1111

1212
* Latencies are measures in float64 milliseconds, denoted "ms"
1313
* Sizes are measured in bytes, denoted "By"
@@ -22,70 +22,70 @@ Buckets for distributions in default views are as follows:
2222

2323
### Measures
2424

25-
Client stats are recorded for each individual HTTP request, including for each redirect (followed or not).
25+
Client stats are recorded for each individual HTTP request, including for each individual redirect (followed or not).
2626

27-
| Measure name | Unit | Description |
28-
|------------------------------------------|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
29-
| opencensus.io/http/client/started_count | 1 | Number of all client requests started |
30-
| opencensus.io/http/client/request_bytes | By | Total bytes sent in request body (not including headers). This is uncompressed bytes. |
31-
| opencensus.io/http/client/response_bytes | By | Total bytes received in response bodies (not including headers but including error responses with bodies). Should be measured from actual bytes received and read, not the value of the Content-Length header. This is uncompressed bytes. Responses with no body should record 0 for this value. |
32-
| opencensus.io/http/client/latency | ms | Time between first byte of request headers sent to last byte of response received, or terminal error |
27+
| Measure name | Unit | Description |
28+
|---------------------------------------------|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
29+
| opencensus.io/http/client/sent_bytes | By | Total bytes sent in request body (not including headers). This is uncompressed bytes. |
30+
| opencensus.io/http/client/received_bytes | By | Total bytes received in response bodies (not including headers but including error responses with bodies). Should be measured from actual bytes received and read, not the value of the Content-Length header. This is uncompressed bytes. Responses with no body should record 0 for this value. |
31+
| opencensus.io/http/client/roundtrip_latency | ms | Time between first byte of request headers sent to last byte of response received, or terminal error |
3332

3433
### Tags
3534

3635
All client metrics should be tagged with the following.
3736

38-
| Tag suffix | Description |
39-
|--------------------|----------------------------------------------------------------------|
40-
| http.client_method | HTTP method, capitalized (i.e. GET, POST, PUT, DELETE, etc.) |
41-
| http.client_path | URL path (not including query string) |
42-
| http.client_status | HTTP status code, or "error" if no response status line was received |
43-
| http.client_host | Value of the request Host header |
37+
| Tag suffix | Description |
38+
|--------------------|----------------------------------------------------------------------------------------------------------|
39+
| http.client_method | HTTP method, capitalized (i.e. GET, POST, PUT, DELETE, etc.) |
40+
| http.client_path | URL path (not including query string) |
41+
| http.client_status | HTTP status code as an integer (e.g. 200, 404, 500.), or "error" if no response status line was received |
42+
| http.client_host | Value of the request Host header |
4443

4544
### Default views
4645

4746
The following set of views are considered minimum required to monitor client side performance:
4847

49-
| View name | Measure suffix | Aggregation | Tags suffix |
50-
|----------------------------------------------|----------------|--------------|-------------------------------------------|
51-
| opencensus.io/http/client/started_count | started_count | count | client_method, client_path |
52-
| opencensus.io/http/client/request_bytes | request_bytes | distribution | client_method, client_path |
53-
| opencensus.io/http/client/response_bytes | response_bytes | distribution | client_method, client_path |
54-
| opencensus.io/http/client/latency | latency | distribution | client_method, client_path |
55-
| opencensus.io/http/client/finished_count | latency | count | client_method, client_path, client_status |
48+
| View name | Measure suffix | Aggregation | Tags suffix |
49+
|---------------------------------------------|-------------------|--------------|-------------------------------------------|
50+
| opencensus.io/http/client/sent_bytes | sent_bytes | distribution | client_method, client_path |
51+
| opencensus.io/http/client/received_bytes | received_bytes | distribution | client_method, client_path |
52+
| opencensus.io/http/client/roundtrip_latency | roundtrip_latency | distribution | client_method, client_path |
53+
| opencensus.io/http/client/completed_count | roundtrip_latency | count | client_method, client_path, client_status |
5654

5755
## Server
5856

57+
Server measures are recorded at the end of request processing.
58+
5959
### Measures
6060

6161
Server stats are recorded for each individual HTTP request, including for each redirect (followed or not).
6262

6363
| Measure name | Unit | Description |
6464
|------------------------------------------|------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
65-
| opencensus.io/http/server/started_count | 1 | Number of all server requests started. |
66-
| opencensus.io/http/server/request_bytes | By | Total bytes received in request body (not including headers). This is uncompressed bytes. |
67-
| opencensus.io/http/server/response_bytes | By | Total bytes sent in response bodies (not including headers but including error responses with bodies). Should be measured from actual bytes received and read, not the value of the Content-Length header. This is uncompressed bytes. Responses with no body should record 0 for this value. |
68-
| opencensus.io/http/server/latency | ms | Time between first byte of request headers sent to last byte of response received, or terminal error |
65+
| opencensus.io/http/server/received_bytes | By | Total bytes received in request body (not including headers). This is uncompressed bytes. |
66+
| opencensus.io/http/server/sent_bytes | By | Total bytes sent in response bodies (not including headers but including error responses with bodies). Should be measured from actual bytes received and read, not the value of the Content-Length header. This is uncompressed bytes. Responses with no body should record 0 for this value. |
67+
| opencensus.io/http/server/server_latency | ms | Time between first byte of request headers read to last byte of response sent, or terminal error |
6968

7069
### Tags
7170

72-
All server metrics should be tagged with the following.
71+
All server metrics should be tagged with the following.
72+
`http.server_method`, `http.server_path`, `http.server_host` are available in the context for the entire request processing.
73+
`http.server_status` is only available around the stats recorded at the end of request processing.
7374

74-
| Tag suffix | Description |
75-
|--------------------|----------------------------------------------------------------------|
76-
| http.server_method | HTTP method, capitalized (i.e. GET, POST, PUT, DELETE, etc.) |
77-
| http.server_path | URL path (not including query string) |
78-
| http.server_status | HTTP server status code. |
79-
| http.server_host | Value of the request Host header |
75+
| Tag suffix | Description |
76+
|--------------------|---------------------------------------------------------------------|
77+
| http.server_method | HTTP method, capitalized (i.e. GET, POST, PUT, DELETE, etc.) |
78+
| http.server_path | URL path (not including query string) |
79+
| http.server_status | HTTP server status code returned, as an integer e.g. 200, 404, 500. |
80+
| http.server_host | Value of the request Host header |
8081

8182
### Default views
8283

8384
The following set of views are considered minimum required to monitor server side performance:
8485

85-
| View name | Measure suffix | Aggregation | Tags suffix |
86-
|----------------------------------------------|----------------|--------------|-------------------------------------------|
87-
| opencensus.io/http/server/started_count | started_count | count | server_method, server_path |
88-
| opencensus.io/http/server/request_bytes | request_bytes | distribution | server_method, server_path |
89-
| opencensus.io/http/server/response_bytes | response_bytes | distribution | server_method, server_path |
90-
| opencensus.io/http/server/latency | latency | distribution | server_method, server_path |
91-
| opencensus.io/http/server/finished_count | latency | count | server_method, server_path, server_status |
86+
| View name | Measure suffix | Aggregation | Tags suffix |
87+
|-------------------------------------------|----------------|--------------|-------------------------------------------|
88+
| opencensus.io/http/server/received_bytes | received_bytes | distribution | server_method, server_path |
89+
| opencensus.io/http/server/sent_bytes | sent_bytes | distribution | server_method, server_path |
90+
| opencensus.io/http/server/server_latency | server_latency | distribution | server_method, server_path |
91+
| opencensus.io/http/server/completed_count | server_latency | count | server_method, server_path, server_status |

0 commit comments

Comments
 (0)