Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redis resource #2836

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ release.
([#2676](https://github.com/open-telemetry/opentelemetry-specification/pull/2676))
- Align log SDK and API component naming
([#2768](https://github.com/open-telemetry/opentelemetry-specification/pull/2768)).
- Add the signal-specific OTEL_EXPORTER_OTLP_LOGS_* environment variables
- Add the signal-specific OTEL*EXPORTER_OTLP_LOGS*\* environment variables
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't make changes that are not directly relevant to the PR. It would be great if you could submit these fixes as a separate PR.

([#2782](https://github.com/open-telemetry/opentelemetry-specification/pull/2782)).
- Add environment variables for configuring the `BatchLogRecordProcessor`.
([#2785](https://github.com/open-telemetry/opentelemetry-specification/pull/2785))
Expand Down Expand Up @@ -220,7 +220,7 @@ release.
([#2508](https://github.com/open-telemetry/opentelemetry-specification/pull/2508)).
- Refactor jvm classes semantic conventions
([#2550](https://github.com/open-telemetry/opentelemetry-specification/pull/2550)).
- Add browser.* attributes
- Add browser.\* attributes
([#2353](https://github.com/open-telemetry/opentelemetry-specification/pull/2353)).
- Change JVM runtime metric `process.runtime.jvm.memory.max`
to `process.runtime.jvm.memory.limit`
Expand Down Expand Up @@ -371,7 +371,7 @@ release.
([#2415](https://github.com/open-telemetry/opentelemetry-specification/pull/2415)).
- Clarify the manner in which aggregation and temporality preferences
are encoded via MetricReader parameters "on the basis of instrument
kind". Rename the environment variable
kind". Rename the environment variable
`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` used to set the
preference to be used when auto-configuring an OTLP Exporter,
defaults to CUMULATIVE, with DELTA an option that makes Counter,
Expand Down Expand Up @@ -532,6 +532,9 @@ 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.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add this PR here before moving out of draft
#2836

([#2145](https://github.com/open-telemetry/opentelemetry-specification/pull/2145))
([#2836](https://github.com/open-telemetry/opentelemetry-specification/pull/2836))

### Compatibility

Expand Down Expand Up @@ -602,7 +605,7 @@ release.

- Fix Syslog severity number mapping in the example.
([#2091](https://github.com/open-telemetry/opentelemetry-specification/pull/2091))
- Add log.* attributes.
- Add log.\* attributes.
([#2022](https://github.com/open-telemetry/opentelemetry-specification/pull/2022))

### Resource
Expand Down Expand Up @@ -995,13 +998,13 @@ Added telemetry schemas documents to the specification ([#2008](https://github.c
- Add `arch` to `host` semantic conventions ([#1483](https://github.com/open-telemetry/opentelemetry-specification/pull/1483))
- Add `runtime` to `container` semantic conventions ([#1482](https://github.com/open-telemetry/opentelemetry-specification/pull/1482))
- Rename `gcp_gke` to `gcp_kubernetes_engine` to have consistency with other
Google products under `cloud.infrastructure_service` ([#1496](https://github.com/open-telemetry/opentelemetry-specification/pull/1496))
Google products under `cloud.infrastructure_service` ([#1496](https://github.com/open-telemetry/opentelemetry-specification/pull/1496))
- `http.url` MUST NOT contain credentials ([#1502](https://github.com/open-telemetry/opentelemetry-specification/pull/1502))
- Add `aws.eks.cluster.arn` to EKS specific semantic conventions ([#1484](https://github.com/open-telemetry/opentelemetry-specification/pull/1484))
- Rename `zone` to `availability_zone` in `cloud` semantic conventions ([#1495](https://github.com/open-telemetry/opentelemetry-specification/pull/1495))
- Rename `cloud.infrastructure_service` to `cloud.platform` ([#1530](https://github.com/open-telemetry/opentelemetry-specification/pull/1530))
- Add section describing that libraries and the collector should autogenerate
the semantic convention keys. ([#1515](https://github.com/open-telemetry/opentelemetry-specification/pull/1515))
the semantic convention keys. ([#1515](https://github.com/open-telemetry/opentelemetry-specification/pull/1515))

## v1.0.1 (2021-02-11)

Expand Down Expand Up @@ -1113,8 +1116,8 @@ New:
the absence of an installed SDK
- Add API and semantic conventions for recording exceptions as Span Events
([#697](https://github.com/open-telemetry/opentelemetry-specification/pull/697))
* API was extended to allow adding arbitrary event attributes ([#874](https://github.com/open-telemetry/opentelemetry-specification/pull/874))
* `exception.escaped` semantic span event attribute was added
- API was extended to allow adding arbitrary event attributes ([#874](https://github.com/open-telemetry/opentelemetry-specification/pull/874))
- `exception.escaped` semantic span event attribute was added
([#784](https://github.com/open-telemetry/opentelemetry-specification/pull/784),
[#946](https://github.com/open-telemetry/opentelemetry-specification/pull/946))
- Allow samplers to modify tracestate
Expand Down Expand Up @@ -1157,13 +1160,13 @@ Updates:
([#690](https://github.com/open-telemetry/opentelemetry-specification/pull/690))
- Remove lazy Event and Link API from Span interface
([#840](https://github.com/open-telemetry/opentelemetry-specification/pull/840))
* SIGs are recommended to remove any existing implementation of the lazy APIs
- SIGs are recommended to remove any existing implementation of the lazy APIs
to avoid conflicts/breaking changes in case they will be reintroduced to the
spec in future.
- Provide clear definitions for readable and read/write span interfaces in the
SDK
([#669](https://github.com/open-telemetry/opentelemetry-specification/pull/669))
* SpanProcessors must provide read/write access at least in OnStart.
- SpanProcessors must provide read/write access at least in OnStart.
- Specify how `Probability` sampler is used with `ParentOrElse` sampler.
- Clarify event timestamp origin and range
([#839](https://github.com/open-telemetry/opentelemetry-specification/pull/839))
Expand All @@ -1180,7 +1183,7 @@ Updates:
([#873](https://github.com/open-telemetry/opentelemetry-specification/pull/873))
- Add semantic conventions for process runtime
([#882](https://github.com/open-telemetry/opentelemetry-specification/pull/882),
[#1137](https://github.com/open-telemetry/opentelemetry-specification/pull/1137))
[#1137](https://github.com/open-telemetry/opentelemetry-specification/pull/1137))
- Use hex encoding for trace id and span id fields in OTLP JSON encoding:
([#911](https://github.com/open-telemetry/opentelemetry-specification/pull/911))
- Explicitly specify the SpanContext APIs IsValid and IsRemote as required
Expand Down Expand Up @@ -1247,8 +1250,8 @@ Updates:
- Clarify Tracer vs TracerProvider in tracing API and SDK spec.
([#619](https://github.com/open-telemetry/opentelemetry-specification/pull/619))
Most importantly:
* Configuration should be stored not per Tracer but in the TracerProvider.
* Active spans are not per Tracer.
- Configuration should be stored not per Tracer but in the TracerProvider.
- Active spans are not per Tracer.
- Do not set any value in Context upon failed extraction
([#671](https://github.com/open-telemetry/opentelemetry-specification/pull/671))
- Clarify semantic conventions around span start and end time
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ MISSPELL = $(TOOLS_DIR)/$(MISSPELL_BINARY)

# see https://github.com/open-telemetry/build-tools/releases for semconvgen updates
# Keep links in semantic_conventions/README.md and .vscode/settings.json in sync!
SEMCONVGEN_VERSION=0.14.0
#SEMCONVGEN_VERSION=0.14.0
SEMCONVGEN_VERSION=latest

# TODO: add `yamllint` step to `all` after making sure it works on Mac.
.PHONY: all
Expand Down Expand Up @@ -80,7 +81,7 @@ table-generation:
# Check if current markdown tables differ from the ones that would be generated from YAML definitions
.PHONY: table-check
table-check:
docker run --rm -v $(PWD)/semantic_conventions:/source -v $(PWD)/specification:/spec \
docker run --rm -it -v $(PWD)/semantic_conventions:/source -v $(PWD)/specification:/spec \
otel/semconvgen:$(SEMCONVGEN_VERSION) -f /source markdown -md /spec --md-check

.PHONY: schema-check
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
Copy link
Member

@joaopgrassi joaopgrassi Oct 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this PR having the same "issue" as the original PR: #2145 (comment)

Did you use this approach as a "workaround" for the conflict as here #2145 (comment)

or is the intention to have redis as a "top-level" entry? If it's because it's a workaround, then maybe we should look into the generator more, or find another way to generate it.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have Redis-specific conventions in database.md. Do we need to introduce a new file just for Redis?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After talking with Joao and verifying on my end, it looks like you're correct and we can indeed use the existing file even though it's under a different "path" with the "traces".


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

**type:** `db.redis`

**Description:** A redis instance

<!-- semconv redis -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `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` | Recommended |
<!-- endsemconv -->