Skip to content

Commit 266632a

Browse files
authored
Fix naming of HTTP Metrics and add request & response count metrics (#1041)
1 parent c050ae5 commit 266632a

25 files changed

+2189
-1112
lines changed

Diff for: internal/collector/nginxossreceiver/documentation.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The current number of connections.
2828
2929
### nginx.http.connections
3030
31-
The total number of connections.
31+
The total number of connections, since NGINX was last started or reloaded.
3232
3333
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
3434
| ---- | ----------- | ---------- | ----------------------- | --------- |
@@ -40,21 +40,29 @@ The total number of connections.
4040
| ---- | ----------- | ------ |
4141
| nginx.connections.outcome | The outcome of the connection. | Str: ``ACCEPTED``, ``ACTIVE``, ``HANDLED``, ``READING``, ``WRITING``, ``WAITING`` |
4242
43+
### nginx.http.request.count
44+
45+
The total number of client requests received, since the last collection interval.
46+
47+
| Unit | Metric Type | Value Type |
48+
| ---- | ----------- | ---------- |
49+
| requests | Gauge | Int |
50+
4351
### nginx.http.requests
4452
45-
The total number of client requests received from clients.
53+
The total number of client requests received, since NGINX was last started or reloaded.
4654
4755
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
4856
| ---- | ----------- | ---------- | ----------------------- | --------- |
4957
| requests | Sum | Int | Cumulative | true |
5058
51-
### nginx.http.response.status
59+
### nginx.http.response.count
5260
53-
The number of responses, grouped by status code range.
61+
The total number of HTTP responses since the last collection interval, grouped by status code range.
5462
55-
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
56-
| ---- | ----------- | ---------- | ----------------------- | --------- |
57-
| responses | Sum | Int | Cumulative | true |
63+
| Unit | Metric Type | Value Type |
64+
| ---- | ----------- | ---------- |
65+
| responses | Gauge | Int |
5866
5967
#### Attributes
6068

Diff for: internal/collector/nginxossreceiver/internal/metadata/generated_config.go

+6-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: internal/collector/nginxossreceiver/internal/metadata/generated_config_test.go

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: internal/collector/nginxossreceiver/internal/metadata/generated_metrics.go

+81-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: internal/collector/nginxossreceiver/internal/metadata/generated_metrics_test.go

+26-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: internal/collector/nginxossreceiver/internal/metadata/testdata/config.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ all_set:
55
enabled: true
66
nginx.http.connections:
77
enabled: true
8+
nginx.http.request.count:
9+
enabled: true
810
nginx.http.requests:
911
enabled: true
10-
nginx.http.response.status:
12+
nginx.http.response.count:
1113
enabled: true
1214
resource_attributes:
1315
instance.id:
@@ -20,9 +22,11 @@ none_set:
2022
enabled: false
2123
nginx.http.connections:
2224
enabled: false
25+
nginx.http.request.count:
26+
enabled: false
2327
nginx.http.requests:
2428
enabled: false
25-
nginx.http.response.status:
29+
nginx.http.response.count:
2630
enabled: false
2731
resource_attributes:
2832
instance.id:

0 commit comments

Comments
 (0)