Skip to content

Commit

Permalink
Added few DBM metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
naman47vyas committed Jun 13, 2024
1 parent 148cf00 commit af28fc5
Show file tree
Hide file tree
Showing 8 changed files with 167 additions and 37 deletions.
76 changes: 46 additions & 30 deletions receiver/mysqlreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@ The number of bytes in the InnoDB buffer pool.
| ---- | ----------- | ------ |
| status | The status of buffer pool data. | Str: ``dirty``, ``clean`` |
### mysql.commands
The number of times each type of command has been executed.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| 1 | Sum | Int | Cumulative | true |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| command | The command types. | Str: ``delete``, ``insert``, ``select``, ``update`` |
### mysql.double_writes
The number of writes to the InnoDB doublewrite buffer.
Expand Down Expand Up @@ -246,6 +260,22 @@ The number of times each type of prepared statement command has been issued.
| ---- | ----------- | ------ |
| command | The prepare statement command types. | Str: ``execute``, ``close``, ``fetch``, ``prepare``, ``reset``, ``send_long_data`` |
### mysql.query.count
The number of statements executed by the server.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| 1 | Sum | Int | Cumulative | true |
### mysql.query.slow.count
The number of slow queries.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| 1 | Sum | Int | Cumulative | true |
### mysql.row_locks
The number of InnoDB row locks.
Expand Down Expand Up @@ -321,6 +351,22 @@ The total count of executed queries per normalized query and schema.
| digest | Digest. | Any Str |
| digest_text | Text before digestion. | Any Str |
### mysql.statement_event.errors
the error count of the summarized events
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| 1 | Sum | Int | Cumulative | true |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| schema | The schema of the object. | Any Str |
| digest | Digest. | Any Str |
| digest_text | Text before digestion. | Any Str |
### mysql.statement_event.wait.time
The total wait time of the summarized timed events.
Expand Down Expand Up @@ -429,20 +475,6 @@ The number of transmitted bytes between server and clients.
| ---- | ----------- | ------ |
| kind | The name of the transmission direction. | Str: ``received``, ``sent`` |
### mysql.commands
The number of times each type of command has been executed.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| 1 | Sum | Int | Cumulative | true |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| command | The command types. | Str: ``delete``, ``insert``, ``select``, ``update`` |
### mysql.connection.count
The number of connection attempts (successful or not) to the MySQL server.
Expand Down Expand Up @@ -503,22 +535,6 @@ The number of statements executed by the server. This includes only statements s
| ---- | ----------- | ---------- | ----------------------- | --------- |
| 1 | Sum | Int | Cumulative | true |
### mysql.query.count
The number of statements executed by the server.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| 1 | Sum | Int | Cumulative | true |
### mysql.query.slow.count
The number of slow queries.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| 1 | Sum | Int | Cumulative | true |
### mysql.replica.sql_delay
The number of seconds that the replica must lag the source.
Expand Down
10 changes: 7 additions & 3 deletions receiver/mysqlreceiver/internal/metadata/generated_config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions receiver/mysqlreceiver/internal/metadata/generated_metrics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions receiver/mysqlreceiver/internal/metadata/generated_metrics_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions receiver/mysqlreceiver/internal/metadata/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ all_set:
enabled: true
mysql.statement_event.count_stars:
enabled: true
mysql.statement_event.errors:
enabled: true
mysql.statement_event.wait.time:
enabled: true
mysql.table.io.wait.count:
Expand Down Expand Up @@ -160,6 +162,8 @@ none_set:
enabled: false
mysql.statement_event.count_stars:
enabled: false
mysql.statement_event.errors:
enabled: false
mysql.statement_event.wait.time:
enabled: false
mysql.table.io.wait.count:
Expand Down
16 changes: 13 additions & 3 deletions receiver/mysqlreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ metrics:
aggregation_temporality: cumulative
attributes: [prepared_statements_command]
mysql.commands:
enabled: false
enabled: true
description: The number of times each type of command has been executed.
unit: 1
sum:
Expand Down Expand Up @@ -571,7 +571,7 @@ metrics:
monotonic: true
aggregation_temporality: cumulative
mysql.query.count:
enabled: false
enabled: true
description: The number of statements executed by the server.
unit: 1
sum:
Expand All @@ -580,11 +580,21 @@ metrics:
monotonic: true
aggregation_temporality: cumulative
mysql.query.slow.count:
enabled: false
enabled: true
description: The number of slow queries.
unit: 1
sum:
value_type: int
input_type: string
monotonic: true
aggregation_temporality: cumulative

mysql.statement_event.errors:
enabled: true
description: the error count of the summarized events
unit: 1
sum:
value_type: int
monotonic: true
aggregation_temporality: cumulative
attributes: [schema, digest, digest_text]
Loading

0 comments on commit af28fc5

Please sign in to comment.