# MySQL Receiver

<!-- llms-txt-link: /llms.txt -->

> OpenTelemetry Collector receiver · contrib distribution

- **Component ID**: `contrib-mysqlreceiver`
- **Name**: `mysqlreceiver`
- **Type**: receiver
- **Distribution**: contrib
- **Repository**: `opentelemetry-collector-contrib`

## Stability

| Level | Signals |
| --- | --- |
| beta | metrics |
| development | logs |

## Attributes

| Attribute | Type | Description |
| --- | --- | --- |
| `buffer_pool_data` | string | The status of buffer pool data. |
| `buffer_pool_operations` | string | The buffer pool operations types. |
| `buffer_pool_pages` | string | The buffer pool pages types. |
| `cache_status` | string | The status of cache access. |
| `client.address` | string | Hostname or address of the client. |
| `client.port` | int | TCP port used by the client. |
| `command` | string | The command types. |
| `connection_error` | string | The connection error type. |
| `connection_status` | string | The connection status. |
| `db.namespace` | string | The default database for the thread, or empty if none has been selected (originally processlist_db). |
| `db.query.text` | string | The SQL statement text for the event. |
| `db.system.name` | string | The name of the database system. |
| `digest` | string | Digest. |
| `digest_text` | string | Text before digestion. |
| `direction` | string | The name of the transmission direction. |
| `double_writes` | string | The doublewrite types. |
| `event_state` | string | Possible event states. |
| `handler` | string | The handler types. |
| `index_name` | string | The name of the index. |
| `io_waits_operations` | string | The io_waits operation type. |
| `join_kind` | string | The kind of join. |
| `locks` | string | The table locks type. |
| `log_operations` | string | The log operation types. 'fsyncs' aren't available in MariaDB 10.8 or later. |
| `mysql.event_id` | int | The thread associated with the event and the thread current event number when the event starts. |
| `mysql.events_statements_current.digest` | string | The statement digest SHA-256 value as a string of 64 hexadecimal characters, or empty if the statements_digest consumer is no. |
| `mysql.events_statements_current.timer_wait` | double | Elapsed time the current statement has been executing, in seconds. |
| `mysql.events_statements_summary_by_digest.count_star` | int | The number of times the statement was executed, report in delta value. |
| `mysql.events_statements_summary_by_digest.digest` | string | The statement digest SHA-256 value as a string of 64 hexadecimal characters, or empty if the statements_digest consumer is no. |
| `mysql.events_statements_summary_by_digest.sum_timer_wait` | double | The total time spent executing the statement, report in delta seconds. |
| `mysql.events_waits_current.timer_wait` | double | Timing information for the event, indicating elapsed time the event waited in seconds. |
| `mysql.query_plan` | string | The query plan for the statement, if available. |
| `mysql.query_plan.hash` | string | This attribute is set to the same value as mysql.events_statements_summary_by_digest.digest (query digest) by design. |
| `mysql.session.id` | int | The unique identifier for the session associated with the event. |
| `mysql.session.status` | string | Simplified session status, either 'waiting', 'running' or 'other'. |
| `mysql.threads.processlist_command` | string | The type of command the thread is executing on behalf of the client for foreground threads, or `Sleep` if the session is idle. |
| `mysql.threads.processlist_state` | string | An action, event, or state that indicates what the thread is doing. |
| `mysql.threads.thread_id` | int | The unique identifier for the thread executing the statement. |
| `mysql.wait_type` | string | The name of the instrument that produced the event. |
| `mysqlx_threads` | string | The worker thread count kind. |
| `network.peer.address` | string | IP address of the peer client. |
| `network.peer.port` | int | TCP port used by the peer client. |
| `opened_resources` | string | The kind of the resource. |
| `operations` | string | The operation types. |
| `page_operations` | string | The page operation types. |
| `prepared_statements_command` | string | The prepare statement command types. |
| `read_lock_type` | string | Read operation types. |
| `row_locks` | string | The row lock type. |
| `row_operations` | string | The row operation type. |
| `schema` | string | The schema of the object. |
| `sorts` | string | The sort count type. |
| `table_name` | string | Table name for event or process. |
| `table_size_type` | string | The table size types. |
| `threads` | string | The thread count type. |
| `tmp_resource` | string | The kind of temporary resources. |
| `user.name` | string | The user associated with a foreground thread, empty for a background thread (originally processlist_user). |
| `write_lock_type` | string | Write operation types. |

## Data

- **JSON**: [/data/collector/components/contrib-mysqlreceiver/contrib-mysqlreceiver-5dc34c70d127.json](/data/collector/components/contrib-mysqlreceiver/contrib-mysqlreceiver-5dc34c70d127.json)
- **Explore**: [/collector/components/contrib/mysqlreceiver](/collector/components/contrib/mysqlreceiver)
