-
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 database semantic convention section and redis server metrics #2070
Add database semantic convention section and redis server metrics #2070
Conversation
Adding a section for semantic conventions around database metrics. Additionally capturing the redis metrics produced by the otel collector redis receiver today as a first step.
This PR came from the work in the collector here open-telemetry/opentelemetry-collector-contrib#5837 |
|
||
| Name | Instrument | Units | Description | Attribute Keys | Attributes | | ||
|-------------------------------|----------------------------|--------------|-------------|-|-| | ||
|`redis.uptime`|Asynchronous Counter|seconds|Number of seconds since Redis server start| |
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.
There is an OTEP about uptime monitoring with active debate, see
. open-telemetry/oteps#185
|`redis.clients.connected`|Asynchronous UpDownCounter||Number of client connections (excluding connections from replicas)| | | | ||
|`redis.clients.max_input_buffer`|Asynchronous Gauge||Biggest input buffer among current client connections| | | | ||
|`redis.clients.max_output_buffer`|Asynchronous Gauge||Biggest output list among current client connections| | | |
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.
These three lines are begging us to finish a specification for what Prometheus calls GaugeHistogram. There would be two asynchronous histograms for input and output buffer sizes, their counts == number of connections, their sums == total input/output size, their min and max describing the smallest and largest input/output buffers, and so on.
Since that's unlikely to happy soon, this is fine.
|`redis.clients.connected`|Asynchronous UpDownCounter||Number of client connections (excluding connections from replicas)| | | | ||
|`redis.clients.max_input_buffer`|Asynchronous Gauge||Biggest input buffer among current client connections| | | | ||
|`redis.clients.max_output_buffer`|Asynchronous Gauge||Biggest output list among current client connections| | | | ||
|`redis.clients.blocked`|Asynchronous Counter||Number of clients pending on a blocking call| | | |
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.
Sounds like UpDownCounter.
|`redis.keys.evicted`|Asynchronous Counter||Total number of evicted keys due to maxmemory limit| | | | ||
|`redis.connections.received`|Asynchronous Counter||Total number of connections accepted by the server| | | | ||
|`redis.connections.rejected`|Asynchronous Counter||Total number of connections rejected because of maxclients limit| | | | ||
|`redis.memory.used`|Asynchronous Gauge|bytes|Total number of bytes allocated by Redis using its allocator| | | |
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.
Sounds like UpDownCounter.
|`redis.connections.rejected`|Asynchronous Counter||Total number of connections rejected because of maxclients limit| | | | ||
|`redis.memory.used`|Asynchronous Gauge|bytes|Total number of bytes allocated by Redis using its allocator| | | | ||
|`redis.memory.peak`|Asynchronous Gauge|bytes|Peak memory consumed| | | | ||
|`redis.memory.rss`|Asynchronous Gauge|bytes|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.
Sounds like UpDownCounter.
|`redis.memory.used`|Asynchronous Gauge|bytes|Total number of bytes allocated by Redis using its allocator| | | | ||
|`redis.memory.peak`|Asynchronous Gauge|bytes|Peak memory consumed| | | | ||
|`redis.memory.rss`|Asynchronous Gauge|bytes|Number of bytes that Redis allocated as seen by the operating system| | | | ||
|`redis.memory.lua`|Asynchronous Gauge|bytes|Number of bytes used by the Lua engine| | | |
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.
Sounds like UpDownCounter.
|`redis.memory.rss`|Asynchronous Gauge|bytes|Number of bytes that Redis allocated as seen by the operating system| | | | ||
|`redis.memory.lua`|Asynchronous Gauge|bytes|Number of bytes used by the Lua engine| | | | ||
|`redis.memory.fragmentation_ratio`|Asynchronous Gauge||Ratio between used_memory_rss and used_memory| | | | ||
|`redis.rdb.changes_since_last_save`|Asynchronous UpDownCounter||Number of changes since the last dump| | | |
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.
Sounds like Synchronous UpDownCounter.
|`redis.memory.lua`|Asynchronous Gauge|bytes|Number of bytes used by the Lua engine| | | | ||
|`redis.memory.fragmentation_ratio`|Asynchronous Gauge||Ratio between used_memory_rss and used_memory| | | | ||
|`redis.rdb.changes_since_last_save`|Asynchronous UpDownCounter||Number of changes since the last dump| | | | ||
|`redis.commands`|Asynchronous Gauge|operations per second|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.
I suggest removing this, it's defined by the rate of redis.commands.processed
.
|`redis.net.input`|Asynchronous Counter|bytes|The total number of bytes read from the network| | | | ||
|`redis.net.output`|Asynchronous Counter|bytes|The total number of bytes written to 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.
The semantic conventions say to use .io
with a direction
attribute: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/README.md#instrument-naming
|`redis.net.output`|Asynchronous Counter|bytes|The total number of bytes written to the network| | | | ||
|`redis.keyspace.hits`|Asynchronous Counter||Number of successful lookup of keys in the main dictionary| | | | ||
|`redis.keyspace.misses`|Asynchronous Counter||Number of failed lookup of keys in the main dictionary| | | | ||
|`redis.latest_fork`|Asynchronous Gauge|microseconds|Duration of the latest fork operation| | | |
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.
Should this be redis.latest_fork.duration
?
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
Adding a section for semantic conventions around database metrics. Additionally capturing the redis metrics produced by the otel collector redis receiver today as a first step.
Related issues # open-telemetry/semantic-conventions#707