forked from open-telemetry/semantic-conventions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add MySQL instance address attribute
At GitHub we run MySQL in multi-node clusters and are often interested in knowing the hostname of a node that is executing a query or command. In order to acheive this we added an attribute to the Trilogy instrumentation named `db.mysql.instance.address` which is populated with the hostname of the node: <open-telemetry/opentelemetry-ruby-contrib#487> This change adds the attribute to the database model as a MySQL specific connection attribute.
- Loading branch information
1 parent
a4c60f7
commit 0240d14
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!--- Hugo front matter used to generate the website version of this page: | ||
linkTitle: MSSQL | ||
---> | ||
|
||
# Semantic Conventions for MySQL | ||
|
||
**Status**: [Experimental][DocumentStatus] | ||
|
||
The Semantic Conventions for the [MySQL](https://www.mysql.com/) extend and override the [Database Semantic Conventions](database-spans.md) | ||
that describe common database operations attributes in addition to the Semantic Conventions | ||
described on this page. | ||
|
||
`db.system` MUST be set to `"mysql"`. | ||
|
||
## Connection-level attributes | ||
|
||
<!-- semconv db.mysql(tag=connection-level-tech-specific) --> | ||
| Attribute | Type | Description | Examples | Requirement Level | | ||
|---|---|---|---|---| | ||
| [`db.jdbc.driver_classname`](database-spans.md) | string | The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. | `org.postgresql.Driver`; `com.microsoft.sqlserver.jdbc.SQLServerDriver` | Recommended | | ||
| `db.mysql.instance.address` | string | The hostname of the MySQL server instance bound to the current connection. This is useful in cases where the client is connecting to a MySQL server via a proxy or in a clustered environment. This client may obtain this value using queries like `select @@hostname`. | `mysql-e26b99z.example.com` | Recommended: If different from the `server.address` | | ||
<!-- endsemconv --> | ||
|
||
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters