Skip to content

Commit

Permalink
fix: Trilogy only set db.instance.id attribute if there is a value (#792
Browse files Browse the repository at this point in the history
)
  • Loading branch information
arielvalentin committed Jan 5, 2024
1 parent 9924715 commit 8b790a1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions instrumentation/trilogy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ OpenTelemetry::Instrumentation::Trilogy.with_attributes('pizzatoppings' => 'mush
end
```

## Semantic Conventions

This instrumentation generally uses [Database semantic conventions](https://opentelemetry.io/docs/specs/semconv/database/database-spans/).

| Attribute Name | Type | Notes |
| - | - | - |
| `db.instance.id` | String | The name of the DB host executing the query e.g. `SELECT @@hostname` |
| `db.name` | String | The name of the database from connection_options |
| `db.statement` | String | SQL statement being executed |
| `db.user` | String | The username from connection_options |
| `db.system` | String | `mysql` |
| `net.peer.name` | String | The name of the remote host from connection_options |

## How can I get involved?

The `opentelemetry-instrumentation-trilogy` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
Expand Down

0 comments on commit 8b790a1

Please sign in to comment.