Skip to content
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

Closed

Conversation

codeboten
Copy link
Contributor

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

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.
@codeboten codeboten requested review from a team October 27, 2021 22:39
@codeboten
Copy link
Contributor Author

This PR came from the work in the collector here open-telemetry/opentelemetry-collector-contrib#5837

@arminru arminru added area:semantic-conventions Related to semantic conventions semconv:database spec:metrics Related to the specification/metrics directory labels Nov 12, 2021

| Name | Instrument | Units | Description | Attribute Keys | Attributes |
|-------------------------------|----------------------------|--------------|-------------|-|-|
|`redis.uptime`|Asynchronous Counter|seconds|Number of seconds since Redis server start|
Copy link
Contributor

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

Comment on lines +21 to +23
|`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| | |
Copy link
Contributor

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| | |
Copy link
Contributor

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| | |
Copy link
Contributor

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| | |
Copy link
Contributor

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| | |
Copy link
Contributor

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| | |
Copy link
Contributor

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| | |
Copy link
Contributor

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.

Comment on lines +37 to +38
|`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| | |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|`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| | |
Copy link
Contributor

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?

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions
Copy link

github-actions bot commented Dec 1, 2021

Closed as inactive. Feel free to reopen if this PR is still being worked on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions semconv:database spec:metrics Related to the specification/metrics directory Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants