Skip to content

Commit ad2e101

Browse files
authored
[receiver/redis] Add bytes unit in metadata.yaml (open-telemetry#23454)
This PR adds the bytes unit to metrics where this is missing. unit is a required field, see https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/metadata-schema.yaml#L72-L73.
1 parent d89a6e1 commit ad2e101

File tree

6 files changed

+112
-83
lines changed

6 files changed

+112
-83
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use this changelog template to create an entry for release notes.
2+
# If your change doesn't affect end users, such as a test fix or a tooling change,
3+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
4+
5+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
6+
change_type: breaking
7+
8+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
9+
component: redisreceiver
10+
11+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
12+
note: Updates metric unit from no unit to Bytes.
13+
14+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
15+
issues: [23454]
16+
17+
# (Optional) One or more lines of additional information to render under the primary note.
18+
# These lines will be padded with 2 spaces and then inserted directly into the document.
19+
# Use pipe (|) for multiline entries.
20+
subtext: |
21+
Affected metrics can be found below.
22+
- redis.clients.max_input_buffer
23+
- redis.clients.max_output_buffer
24+
- redis.replication.backlog_first_byte_offset
25+
- redis.replication.offset

receiver/redisreceiver/documentation.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ Biggest input buffer among current client connections
3434
3535
| Unit | Metric Type | Value Type |
3636
| ---- | ----------- | ---------- |
37-
| | Gauge | Int |
37+
| By | Gauge | Int |
3838
3939
### redis.clients.max_output_buffer
4040
4141
Longest output list among current client connections
4242
4343
| Unit | Metric Type | Value Type |
4444
| ---- | ----------- | ---------- |
45-
| | Gauge | Int |
45+
| By | Gauge | Int |
4646
4747
### redis.commands
4848
@@ -242,15 +242,15 @@ The master offset of the replication backlog buffer
242242
243243
| Unit | Metric Type | Value Type |
244244
| ---- | ----------- | ---------- |
245-
| | Gauge | Int |
245+
| By | Gauge | Int |
246246
247247
### redis.replication.offset
248248
249249
The server's current replication offset
250250
251251
| Unit | Metric Type | Value Type |
252252
| ---- | ----------- | ---------- |
253-
| | Gauge | Int |
253+
| By | Gauge | Int |
254254
255255
### redis.slaves.connected
256256

receiver/redisreceiver/internal/metadata/generated_metrics.go

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

receiver/redisreceiver/internal/metadata/generated_metrics_test.go

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

receiver/redisreceiver/metadata.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ metrics:
112112
redis.clients.max_input_buffer:
113113
enabled: true
114114
description: Biggest input buffer among current client connections
115-
unit: ""
115+
unit: "By"
116116
gauge:
117117
value_type: int
118118

119119
redis.clients.max_output_buffer:
120120
enabled: true
121121
description: Longest output list among current client connections
122-
unit: ""
122+
unit: "By"
123123
gauge:
124124
value_type: int
125125

@@ -284,14 +284,14 @@ metrics:
284284
redis.replication.backlog_first_byte_offset:
285285
enabled: true
286286
description: The master offset of the replication backlog buffer
287-
unit: ""
287+
unit: "By"
288288
gauge:
289289
value_type: int
290290

291291
redis.replication.offset:
292292
enabled: true
293293
description: The server's current replication offset
294-
unit: ""
294+
unit: "By"
295295
gauge:
296296
value_type: int
297297

0 commit comments

Comments
 (0)