-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add redis metrics semantic conventions #2547
Conversation
611ef9a
to
d684a66
Compare
This replaces #2525 |
Related to #2521 and #2525. FYI @haboy52587. |
@pmcollins @dmitryax as codeowners of Redis receiver in the Collector it would be great if you review this PR. |
| Name | Instrument | Value type | Unit | Unit ([UCUM](../README.md#instrument-units)) | Description | Attribute Key | Attribute Values | | ||
| ---------------------------------------------- | ------------- | ---------- | ------------ | -------------------------------------------- | --------------------------------------------------------------------- | ------------- | ---------------- | | ||
| db.redis.uptime | Counter | Int64 | seconds | `{s}` | Number of seconds since Redis server start | | | | ||
| db.redis.cpu.time | Counter | Double | seconds | `{s}` | System CPU consumed by the Redis server in seconds since server start | `state` | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why having another metric for "cpu.time" rather than "process.cpu.time" with a "db.system" attribute on the resource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bogdandrutu is there a guideline around when to add a new metric vs when to add a label to an existing metric? Just want to get some clarity on what other metrics we should be considering this with.
For example the connections received/rejected, uptime and all memory metrics feel like they may fall into this category as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go this path anytime is possible :) Maybe we need some documentation about this?
| db.redis.memory.lua | Gauge | Int64 | bytes | `{by}` | Number of bytes used by the Lua engine | | | | ||
| db.redis.memory.fragmentation_ratio | Gauge | Double | | | Ratio between used_memory_rss and used_memory | | | | ||
| db.redis.rdb.changes_since_last_save | UpDownCounter | Int64 | changes | `{changes}` | Number of changes since the last dump | | | | ||
| db.redis.commands | Gauge | Int64 | operations | `{ops}/s` | Number of commands processed per second | | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to have this when we have the db.redis.commands.processed
as counter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the rate could be calculated from the db.redis.commands.processed
counter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then why not removing it?
| db.redis.connections.rejected | Counter | Int64 | connections | `{connections}` | Number of connections rejected because of maxclients limit | | | | ||
| db.redis.memory.used | Gauge | Int64 | bytes | `{by}` | Total number of bytes allocated by Redis using its allocator | | | | ||
| db.redis.memory.peak | Gauge | Int64 | bytes | `{by}` | Peak memory consumed by Redis | | | | ||
| db.redis.memory.rss | Gauge | Int64 | bytes | `{by}` | Number of bytes that Redis allocated as seen by the operating system | | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could be a more generic metric ie. process.memory.rss
| db.redis.memory.lua | Gauge | Int64 | bytes | `{by}` | Number of bytes used by the Lua engine | | | | ||
| db.redis.memory.fragmentation_ratio | Gauge | Double | | | Ratio between used_memory_rss and used_memory | | | | ||
| db.redis.rdb.changes_since_last_save | UpDownCounter | Int64 | changes | `{changes}` | Number of changes since the last dump | | | | ||
| db.redis.commands | Gauge | Int64 | operations | `{ops}/s` | Number of commands processed per second | | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the rate could be calculated from the db.redis.commands.processed
counter
| db.redis.rdb.changes_since_last_save | UpDownCounter | Int64 | changes | `{changes}` | Number of changes since the last dump | | | | ||
| db.redis.commands | Gauge | Int64 | operations | `{ops}/s` | Number of commands processed per second | | | | ||
| db.redis.commands.processed | Counter | Int64 | operations | `{ops}` | Total number of commands processed by the server | | | | ||
| db.redis.net.input | Counter | Int64 | bytes | `{by}` | The total number of bytes read from the network | | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
net input/output could be generalized as process metrics.
As per the suggestions made in open-telemetry/opentelemetry-specification#2547, changing the following metrics: - redis.cpu.time -> process.cpu.time
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
The following adds semantic conventions for redis metrics.
5412274
to
eb02c4c
Compare
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Changes
The following adds semantic conventions for redis metrics.