From 89596ca5f11edc47fed4ebc2950b6e7675a35d59 Mon Sep 17 00:00:00 2001 From: Heber Silva Date: Fri, 20 May 2022 16:18:20 -0400 Subject: [PATCH 1/4] Added mysql metrics addition --- .../instrumentation/mysql.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 specification/metrics/semantic_conventions/instrumentation/mysql.md diff --git a/specification/metrics/semantic_conventions/instrumentation/mysql.md b/specification/metrics/semantic_conventions/instrumentation/mysql.md new file mode 100644 index 00000000000..a4f54871102 --- /dev/null +++ b/specification/metrics/semantic_conventions/instrumentation/mysql.md @@ -0,0 +1,37 @@ +# Instrumenting MYSQL + +**Status**: [Experimental](../../../document-status.md) + +This document defines how to apply semantic conventions when instrumenting Postgres. + + + +- [MYSQL Metrics](#mysql-metrics) + + + +## 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` | \ No newline at end of file From 024910a767eed11c18a798b7d0c376488edab695 Mon Sep 17 00:00:00 2001 From: Heber Silva Date: Mon, 23 May 2022 10:45:40 -0400 Subject: [PATCH 2/4] Modified mysql name --- .../metrics/semantic_conventions/instrumentation/mysql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/metrics/semantic_conventions/instrumentation/mysql.md b/specification/metrics/semantic_conventions/instrumentation/mysql.md index a4f54871102..d0f2bd0b3b7 100644 --- a/specification/metrics/semantic_conventions/instrumentation/mysql.md +++ b/specification/metrics/semantic_conventions/instrumentation/mysql.md @@ -34,4 +34,4 @@ This document defines how to apply semantic conventions when instrumenting Postg | 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` | \ No newline at end of file +| db.mysql.threads | UpDownCounter | Int64 | threads | `{threads}` | The state of MySQL threads. | `threads` | `cached`, `connected`, `created`, `running` | \ No newline at end of file From 9f5f1ad08f33a8524896c0cdc198b17567e33114 Mon Sep 17 00:00:00 2001 From: Heber Silva Date: Mon, 23 May 2022 14:25:16 -0400 Subject: [PATCH 3/4] Modified CHANGELOG.md --- CHANGELOG.md | 2 ++ .../metrics/semantic_conventions/instrumentation/mysql.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b15a9b50b05..4cc2229b1c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 + ([#1027](https://github.com/open-telemetry/opentelemetry-specification/pull/2576)) Updates: diff --git a/specification/metrics/semantic_conventions/instrumentation/mysql.md b/specification/metrics/semantic_conventions/instrumentation/mysql.md index d0f2bd0b3b7..8ad286d04bf 100644 --- a/specification/metrics/semantic_conventions/instrumentation/mysql.md +++ b/specification/metrics/semantic_conventions/instrumentation/mysql.md @@ -17,7 +17,7 @@ This document defines how to apply semantic conventions when instrumenting Postg | 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.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` | From 227936e111cd309aa1070a6aad335eb99969c10f Mon Sep 17 00:00:00 2001 From: Heber Silva Date: Tue, 24 May 2022 11:18:11 -0400 Subject: [PATCH 4/4] Modified CHANGELOG.md and mysql.md --- CHANGELOG.md | 2 +- .../metrics/semantic_conventions/instrumentation/mysql.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cc2229b1c8..fea702fae0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -939,7 +939,7 @@ New: - 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 - ([#1027](https://github.com/open-telemetry/opentelemetry-specification/pull/2576)) + ([#2576](https://github.com/open-telemetry/opentelemetry-specification/pull/2576)) Updates: diff --git a/specification/metrics/semantic_conventions/instrumentation/mysql.md b/specification/metrics/semantic_conventions/instrumentation/mysql.md index 8ad286d04bf..2a0e6b9103d 100644 --- a/specification/metrics/semantic_conventions/instrumentation/mysql.md +++ b/specification/metrics/semantic_conventions/instrumentation/mysql.md @@ -34,4 +34,4 @@ This document defines how to apply semantic conventions when instrumenting Postg | 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` | \ No newline at end of file +| db.mysql.threads | UpDownCounter | Int64 | threads | `{threads}` | The state of MySQL threads. | `threads` | `cached`, `connected`, `created`, `running` |