Skip to content

[redisreceiver] Fix incorrect metric types and units in Redis receiver metadata #40814

Open
@shmsr

Description

@shmsr

Component(s)

receiver/redis

What happened?

Description

The Redis receiver has several bugs in its metadata.yaml file where metrics are incorrectly classified as sum when they should be gauge, and some units are incorrect for offset values.

Steps to Reproduce

NA

Expected Result

Several metrics representing current state are incorrectly defined as sum metrics:

  • redis.clients.connected
  • redis.clients.blocked
  • redis.slaves.connected
  • redis.rdb.changes_since_last_save
  • redis.role

A couple of metrics needs fixes in its unit field:

*offset metrics are marked as unit: "By" i.e., redis.replication.backlog_first_byte_offset and redis.replication.offset

Ref: https://redis.io/docs/latest/commands/info/ to now about the metrics

Actual Result

  • metrics should be marked as gauge and not sum for the aforementioned metrics
  • redis.replication.backlog_first_byte_offset and redis.replication.offset should have unit: 1?

Collector version

v0.128.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

Log output

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreceiver/redisRedis related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions