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

Rename "labels" to "attributes" OTEP 0152 #181

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 13 additions & 13 deletions text/0152-telemetry-schemas.md
Expand Up @@ -18,7 +18,7 @@
* [rename_attributes Transformation](#rename_attributes-transformation-1)
* [metrics Section](#metrics-section)
* [rename_metrics Transformation](#rename_metrics-transformation)
* [rename_labels Transformation](#rename_labels-transformation)
* [rename_attributes Transformation](#rename_attributes-transformation)
* [logs Section](#logs-section)
* [rename_attributes Transformation](#rename_attributes-transformation-2)
* [Order of Transformations](#order-of-transformations)
Expand All @@ -44,8 +44,8 @@
Telemetry sources such as instrumented applications and consumers of telemetry
such as observability backends sometimes make implicit assumptions about the
emitted telemetry. They assume that the telemetry will contain certain
attributes or labels or otherwise have a certain shape and composition of data
(this is referred to as "telemetry schema" throughout this document).
attributes or otherwise have a certain shape and composition of data (this is
referred to as "telemetry schema" throughout this document).

This makes it difficult or impossible to change the composition of the emitted
telemetry data without breaking the consumers. For example changing the name of
Expand Down Expand Up @@ -334,7 +334,7 @@ the new name of the attribute starting from this version. Here is the structure:

The transformations in section "all" apply to the following telemetry data:
resource attributes, span attributes, span event attributes, log attributes,
metric labels.
metric attributes.

Important: when converting from the previous version to the current version the
transformation sequence in section "all" is performed first. After that the
Expand Down Expand Up @@ -448,7 +448,7 @@ defines a sequence of actions to be applied to convert metrics from the previous
version to this version.

Two transformations are supported for section "metrics": "rename_metrics" and
"rename_labels".
"rename_attributes".

#### rename_metrics Transformation

Expand All @@ -464,18 +464,18 @@ Here is the structure:
# starting from this version.
```

#### rename_labels Transformation
#### rename_attributes Transformation

This is similar to the "rename_attributes" transformation supported in "span"
sections. Here is the structure:

```yaml
metrics:
changes:
- rename_labels:
label_map:
# map of key/values. The keys are the old label name used
# in the previous version, the values are the new label name
- rename_attributes:
attribute_map:
# map of key/values. The keys are the old attribute name used
# in the previous version, the values are the new attribute name
# starting from this version.

apply_to_metrics:
Expand Down Expand Up @@ -842,7 +842,7 @@ The benchmark does the following:
conventions were renamed.

- Uses data composed of batches of 100 spans each with 10 attributes or 100
metric data points (Int64 Gauge type) with 2 labels per data point. Each batch
metric data points (Int64 Gauge type) with 2 attributes per data point. Each batch
is associated with one resource that has 20 attributes.

Here are the benchmark results:
Expand Down Expand Up @@ -1151,8 +1151,8 @@ versions:
container.cpu.usage.total: cpu.usage.total
container.memory.usage.max: memory.usage.max

- rename_labels:
label_map:
- rename_attributes:
attribute_map:
status: state
apply_to_metrics:
# Optional. If it is missing the transformation is applied
Expand Down