Skip to content

Commit

Permalink
Fix Redis sample (db.redis.database_index was missing) (open-telemetr…
Browse files Browse the repository at this point in the history
  • Loading branch information
arminru authored and Alex Boten committed Jul 20, 2020
1 parent 8c48458 commit 38c98bd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions specification/trace/semantic_conventions/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,20 @@ For example, when retrieving a document, `db.operation` would be set to (literal
### Redis

In this example, Redis is connected using a unix domain socket and therefore the connection string and `net.peer.ip` are left out.
Furthermore, `db.name` is not specified as there is no database name in Redis.
If a database other than the default database (index 0) is used, it would make sense to specify its index number as `db.name`.
Furthermore, `db.name` is not specified as there is no database name in Redis and `db.redis.database_index` is set instead.

| Key | Value |
| :---------------------- | :----------------------------------------------------------- |
| Span name | `"HMSET myhash"` |
| `db.system` | `"redis"` |
| `db.connection_string` | not set |
| `db.user` | not set |
| `net.peer.name` | `"/tmp/redis.sock"` |
| `net.transport` | `"Unix"` |
| `db.name` | not set |
| `db.statement` | `"HMSET myhash field1 'Hello' field2 'World"` |
| `db.operation` | not set |
| :------------------------ | :-------------------------------------------- |
| Span name | `"HMSET myhash"` |
| `db.system` | `"redis"` |
| `db.connection_string` | not set |
| `db.user` | not set |
| `net.peer.name` | `"/tmp/redis.sock"` |
| `net.transport` | `"Unix"` |
| `db.name` | not set |
| `db.statement` | `"HMSET myhash field1 'Hello' field2 'World"` |
| `db.operation` | not set |
| `db.redis.database_index` | `15` |

### MongoDB

Expand Down

0 comments on commit 38c98bd

Please sign in to comment.