Skip to content

Commit

Permalink
Add semantic conventions for redis receiver
Browse files Browse the repository at this point in the history
update CHANGELOG.md and README.md for redis resource semantic convention

added db.redis.instance semantic convention

added db.redis.instance attribute
  • Loading branch information
hughesjj committed Sep 23, 2022
1 parent 0ff1c36 commit 3d89d66
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@ release.
conventions. ([#2272](https://github.com/open-telemetry/opentelemetry-specification/pull/2272))
- Add opentracing.ref_type semantic convention.
([#2297](https://github.com/open-telemetry/opentelemetry-specification/pull/2297))
- Add `db.redis.instance` Resource attribute in Redis.
([#2145](https://github.com/open-telemetry/opentelemetry-specification/pull/2145))

### Compatibility

Expand Down
14 changes: 14 additions & 0 deletions semantic_conventions/resource/db/redis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
groups:
- id: redis
prefix: db.redis
brief: >
A redis instance
attributes:
- id: instance
type: string
brief: >
The reported name of the Redis instance. This can be in the form of
`{host}:{port}` or any other name provided manually while configuring
the instrumentation. If not provided, the default value is the `endpoint`
value provided in the configuration.
examples: ['localhost:6379', 'product_info_redis']
7 changes: 7 additions & 0 deletions specification/resource/semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This document defines standard attributes for resources. These attributes are ty
- [Compute Unit](#compute-unit)
- [Compute Instance](#compute-instance)
- [Environment](#environment)
- [Database](#database)
- [Version attributes](#version-attributes)
- [Cloud-Provider-Specific Attributes](#cloud-provider-specific-attributes)

Expand Down Expand Up @@ -158,6 +159,12 @@ Attributes defining a running environment (e.g. Operating System, Cloud, Data Ce
- [Kubernetes](./k8s.md)
- [Browser](./browser.md)

## Database

Attributes defining a database service.

- [Redis](./db/redis.md)

## Version attributes

Version attributes, such as `service.version`, are values of type `string`. They are
Expand Down
13 changes: 13 additions & 0 deletions specification/resource/semantic_conventions/db/redis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Redis

**Status**: [Experimental](../../../document-status.md)

**type:** `db.redis`

**Description:** A redis instance

<!-- semconv redis -->
| Attribute | Type | Description | Examples | Required |
|---|---|---|---|---|
| `db.redis.instance` | string | The reported name of the Redis instance. This can be in the form of `{host}:{port}` or any other name provided manually while configuring the instrumentation. If not provided, the default value is the `endpoint` value provided in the configuration. | `localhost:6379`; `product_info_redis` | No |
<!-- endsemconv -->

0 comments on commit 3d89d66

Please sign in to comment.