Skip to content

Commit 0434993

Browse files
[receiver/nginx] Enable attribute reaggregation (#47489)
This PR enables the re-aggregation feature for the `nginx` receiver by: 1. Setting `reaggregation_enabled: true` in `metadata.yaml` 2. Marking the `state` attribute as `recommended` so it can be disabled by users for reaggregation The `state` attribute (active/reading/writing/waiting) is used only by `nginx.connections_current`. Marking it `recommended` means it is enabled by default (preserving current behavior) but can be disabled via config to aggregate across all states. Generated files under `internal/metadata/` were regenerated with `go generate ./...` followed by `goimports -w` (as `make generate` does at the root). Fixes #46368 Part of #45396 --------- Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
1 parent dd7a5f2 commit 0434993

8 files changed

Lines changed: 280 additions & 58 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
change_type: enhancement
2+
component: receiver/nginx
3+
note: Enable the re-aggregation feature for the nginx receiver
4+
issues: [46368]
5+
subtext:
6+
change_logs: [user]

receiver/nginxreceiver/internal/metadata/config.schema.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ $defs:
1818
enabled:
1919
type: boolean
2020
default: true
21+
aggregation_strategy:
22+
type: string
23+
enum:
24+
- "sum"
25+
- "avg"
26+
- "min"
27+
- "max"
28+
default: "sum"
29+
attributes:
30+
type: array
31+
items:
32+
type: string
33+
enum:
34+
- "state"
35+
default:
36+
- "state"
2137
nginx.connections_handled:
2238
description: "NginxConnectionsHandledMetricConfig provides config for the nginx.connections_handled metric."
2339
type: object

receiver/nginxreceiver/internal/metadata/generated_config.go

Lines changed: 104 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/nginxreceiver/internal/metadata/generated_config_test.go

Lines changed: 15 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)