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

Mysql metrics addition #2576

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,8 @@ New:
([#1154](https://github.com/open-telemetry/opentelemetry-specification/pull/1154))
- Add OTEL_TRACE_SAMPLER_ARG env variable definition
([#1202](https://github.com/open-telemetry/opentelemetry-specification/pull/1202))
- Added semantic conventions for MySQL databse and add specific attributes
([#2576](https://github.com/open-telemetry/opentelemetry-specification/pull/2576))

Updates:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Instrumenting MYSQL

**Status**: [Experimental](../../../document-status.md)

This document defines how to apply semantic conventions when instrumenting Postgres.

<!-- toc -->

- [MYSQL Metrics](#mysql-metrics)

<!-- tocstop -->

## MYSQL Metrics

**Description:** General MYSQL metrics.

| Name | Instrument | Value type | Unit | Unit ([UCUM](../README.md#instrument-units)) | Description | Attribute Key | Attribute Values |
|-------------------------------------| ------------- | ---------- | ---------- | -------------------------------------------- | ----------------------------------- | ------------- | ---------------- |
| db.mysql.buffer_pool.pages | UpDownCounter | Int64 | pages | `{pages}` | The number of pages in the InnoDB buffer pool. | `buffer_pool_pages` | `data`, `free`, `misc` |
| db.mysql.buffer_pool.data_pages | UpDownCounter | Int64 | pages | `{pages} ` | The number of data pages in the InnoDB buffer pool. | `buffer_pool_data` | `dirty`, `clean` |
| db.mysql.buffer_pool.page_flushes | Counter | Int64 | flushes | `{flushes}` | The number of requests to flush pages from the InnoDB buffer pool. | | |
| db.mysql.buffer_pool.operations | Counter | Int64 | operations | `{operations}` | The number of operations on the InnoDB buffer pool. | `buffer_pool_operations` | The buffer pool operations types. |
| | | | | | | | `read_ahead_rnd`, `read_ahead`, `read_ahead_evicted`, `read_requests`, `reads`, `wait_free`, `write_requests` |
| db.mysql.buffer_pool.limit | UpDownCounter | Int64 | limit | `{limit}` | The configured size of the InnoDB buffer pool. | |
| db.mysql.buffer_pool.usage | UpDownCounter | Int64 | usage | `{usage}` | The number of bytes in the InnoDB buffer pool. | `buffer_pool_data` | `dirty`, `clean` |
| db.mysql.commands | Counter | Int64 | commands | `{commands}` | The number of times each type of command has been executed. | `command` | `execute`, `close`, `fetch`, `prepare`, `reset`, `send_long_data` |
| db.mysql.handlers | Counter | Int64 | handlers | `{handlers}` | The number of requests to various MySQL handlers. | `handler` | The handler types |
| | | | | | | | `ommit`, `delete`, `discover`, `external_lock`, `mrr_init`, `prepare`, `read_first`, `read_key`, `read_last`, `read_next`, `read_prev`, `read_rnd`, `read_rnd_next`, `rollback`, `savepoint`, `savepoint_rollback`, `update`, `write` |
| db.mysql.double_writes | Counter | Int64 | writes | `writes` | The number of writes to the InnoDB doublewrite buffer. | `double_writes` | `pages_written`, `writes` |
| db.mysql.log_operations | Counter | Int64 | operations | `{operations}` | The number of InnoDB log operations. | `log_operations` | `waits`, `write_requests`, `writes` |
| db.mysql.operations | Counter | Int64 | operations | `{operations}` | The number of InnoDB operations. | `operations` | `fsyncs`, `reads`, `writes` |
| db.mysql.page_operations | Counter | Int64 | operations | `{operations}` | The number of InnoDB page operations. | `page_operations` | `created`, `read`, `written` |
| db.mysql.row_locks | Counter | Int64 | locks | `{locks}` | The number of InnoDB row locks. | `row_locks` | `waits`, `time` |
| db.mysql.row_operations | Counter | Int64 | operations | `{operations}` | The number of InnoDB row operations. | `row_operations` | `deleted`, `inserted`, `read`, `updated` |
| db.mysql.locks | Counter | int64 | locks | `{locks}` | The number of MySQL locks. | `locks` | `immediate`, `waited` |
| db.mysql.sorts | Counter | Int64 | sorts | `{sorts}` | The number of MySQL sorts. | `sorts` | `merge_passes`, `range`, `rows`, `scan` |
| db.mysql.threads | UpDownCounter | Int64 | threads | `{threads}` | The state of MySQL threads. | `threads` | `cached`, `connected`, `created`, `running` |