From 3d89d669df10c3339881bfefdbd9e2cbe0630402 Mon Sep 17 00:00:00 2001 From: hughesjj Date: Mon, 12 Sep 2022 09:40:35 -0700 Subject: [PATCH] Add semantic conventions for redis receiver update CHANGELOG.md and README.md for redis resource semantic convention added db.redis.instance semantic convention added db.redis.instance attribute --- CHANGELOG.md | 2 ++ semantic_conventions/resource/db/redis.yaml | 14 ++++++++++++++ .../resource/semantic_conventions/README.md | 7 +++++++ .../resource/semantic_conventions/db/redis.md | 13 +++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 semantic_conventions/resource/db/redis.yaml create mode 100644 specification/resource/semantic_conventions/db/redis.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c449241dcf7..24f5880cee3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/semantic_conventions/resource/db/redis.yaml b/semantic_conventions/resource/db/redis.yaml new file mode 100644 index 00000000000..9503068e9e4 --- /dev/null +++ b/semantic_conventions/resource/db/redis.yaml @@ -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'] diff --git a/specification/resource/semantic_conventions/README.md b/specification/resource/semantic_conventions/README.md index 31f29611091..87d79b25868 100644 --- a/specification/resource/semantic_conventions/README.md +++ b/specification/resource/semantic_conventions/README.md @@ -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) @@ -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 diff --git a/specification/resource/semantic_conventions/db/redis.md b/specification/resource/semantic_conventions/db/redis.md new file mode 100644 index 00000000000..4ce19dffab5 --- /dev/null +++ b/specification/resource/semantic_conventions/db/redis.md @@ -0,0 +1,13 @@ +# Redis + +**Status**: [Experimental](../../../document-status.md) + +**type:** `db.redis` + +**Description:** A redis instance + + +| 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 | + \ No newline at end of file