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

Commit 137d1c0

Browse files
author
Ramon Nogueira
authored
Remove the path tag from the default HTTP views (#115)
Fixes: #111
1 parent 2c10a54 commit 137d1c0

1 file changed

Lines changed: 22 additions & 10 deletions

File tree

stats/HTTP.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,19 @@ starts and are available in the context for the entire outgoing request processi
4646
`http_client_status` is set when an outgoing request finishes and is only available around the
4747
stats recorded at the end of request processing.
4848

49+
`http_client_path` and `http_client_host` might have high cardinality and you should be careful about using these
50+
in views if your metrics backend cannot tolerate high-cardinality labels.
4951

5052
### Default views
5153

5254
The following set of views are considered minimum required to monitor client side performance:
5355

5456
| View name | Measure | Aggregation | Tags |
5557
|---------------------------------------------|---------------------------------------------|--------------|----------------------------------------------------------|
56-
| opencensus.io/http/client/sent_bytes | opencensus.io/http/client/sent_bytes | distribution | http_client_method, http_client_path |
57-
| opencensus.io/http/client/received_bytes | opencensus.io/http/client/received_bytes | distribution | http_client_method, http_client_path |
58-
| opencensus.io/http/client/roundtrip_latency | opencensus.io/http/client/roundtrip_latency | distribution | http_client_method, http_client_path |
59-
| opencensus.io/http/client/completed_count | opencensus.io/http/client/roundtrip_latency | count | http_client_method, http_client_path, http_client_status |
58+
| opencensus.io/http/client/sent_bytes | opencensus.io/http/client/sent_bytes | distribution | http_client_method |
59+
| opencensus.io/http/client/received_bytes | opencensus.io/http/client/received_bytes | distribution | http_client_method |
60+
| opencensus.io/http/client/roundtrip_latency | opencensus.io/http/client/roundtrip_latency | distribution | http_client_method |
61+
| opencensus.io/http/client/completed_count | opencensus.io/http/client/roundtrip_latency | count | http_client_method, http_client_status |
6062

6163
## Server
6264

@@ -88,13 +90,23 @@ starts and are available in the context for the entire incoming request processi
8890
`http_server_status` is set when an incoming request finishes and is only available around the stats
8991
recorded at the end of request processing.
9092

93+
`http_server_path` and `http_server_host` are set by the client: you should be careful about using these
94+
in views if your metrics backend cannot tolerate high-cardinality labels.
95+
9196
### Default views
9297

9398
The following set of views are considered minimum required to monitor server side performance:
9499

95-
| View name | Measure | Aggregation | Tags |
96-
|-------------------------------------------|------------------------------------------|--------------|----------------------------------------------------------|
97-
| opencensus.io/http/server/received_bytes | opencensus.io/http/server/received_bytes | distribution | http_server_method, http_server_path |
98-
| opencensus.io/http/server/sent_bytes | opencensus.io/http/server/sent_bytes | distribution | http_server_method, http_server_path |
99-
| opencensus.io/http/server/server_latency | opencensus.io/http/server/server_latency | distribution | http_server_method, http_server_path |
100-
| opencensus.io/http/server/completed_count | opencensus.io/http/server/server_latency | count | http_server_method, http_server_path, http_server_status |
100+
| View name | Measure | Aggregation | Tags |
101+
|-------------------------------------------|------------------------------------------|--------------|----------------------------------------|
102+
| opencensus.io/http/server/received_bytes | opencensus.io/http/server/received_bytes | distribution | http_server_method |
103+
| opencensus.io/http/server/sent_bytes | opencensus.io/http/server/sent_bytes | distribution | http_server_method |
104+
| opencensus.io/http/server/server_latency | opencensus.io/http/server/server_latency | distribution | http_server_method |
105+
| opencensus.io/http/server/completed_count | opencensus.io/http/server/server_latency | count | http_server_method, http_server_status |
106+
107+
## FAQ
108+
109+
### Why was the path removed from the default views?
110+
111+
Path can have unbounded cardinality, which causes problems for time-series databases like Prometheus.
112+
This is especially true of public-facing HTTP servers, where this becomes a DoS vector.

0 commit comments

Comments
 (0)