Skip to content

Commit

Permalink
[receiver/redis] Add bytes unit in metadata.yaml (open-telemetry#23454)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mackjmr committed Jun 20, 2023
1 parent d89a6e1 commit ad2e101
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 83 deletions.
25 changes: 25 additions & 0 deletions .chloggen/add-units-redisreceiver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: redisreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Updates metric unit from no unit to Bytes.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [23454]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
Affected metrics can be found below.
- redis.clients.max_input_buffer
- redis.clients.max_output_buffer
- redis.replication.backlog_first_byte_offset
- redis.replication.offset
8 changes: 4 additions & 4 deletions receiver/redisreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ Biggest input buffer among current client connections
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| | Gauge | Int |
| By | Gauge | Int |
### redis.clients.max_output_buffer
Longest output list among current client connections
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| | Gauge | Int |
| By | Gauge | Int |
### redis.commands
Expand Down Expand Up @@ -242,15 +242,15 @@ The master offset of the replication backlog buffer
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| | Gauge | Int |
| By | Gauge | Int |
### redis.replication.offset
The server's current replication offset
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| | Gauge | Int |
| By | Gauge | Int |
### redis.slaves.connected
Expand Down
8 changes: 4 additions & 4 deletions receiver/redisreceiver/internal/metadata/generated_metrics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions receiver/redisreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ metrics:
redis.clients.max_input_buffer:
enabled: true
description: Biggest input buffer among current client connections
unit: ""
unit: "By"
gauge:
value_type: int

redis.clients.max_output_buffer:
enabled: true
description: Longest output list among current client connections
unit: ""
unit: "By"
gauge:
value_type: int

Expand Down Expand Up @@ -284,14 +284,14 @@ metrics:
redis.replication.backlog_first_byte_offset:
enabled: true
description: The master offset of the replication backlog buffer
unit: ""
unit: "By"
gauge:
value_type: int

redis.replication.offset:
enabled: true
description: The server's current replication offset
unit: ""
unit: "By"
gauge:
value_type: int

Expand Down
Loading

0 comments on commit ad2e101

Please sign in to comment.