diff --git a/.chloggen/add_back_deprecated_migrations.yaml b/.chloggen/add_back_deprecated_migrations.yaml new file mode 100644 index 0000000000..4fb2160912 --- /dev/null +++ b/.chloggen/add_back_deprecated_migrations.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: db, http, messaging + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: This enables a user to see which attributes are no longer applicable and support a migration + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [2601] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/docs/exceptions/exceptions-spans.md b/docs/exceptions/exceptions-spans.md index c39ca0ad7d..31397ea6b1 100644 --- a/docs/exceptions/exceptions-spans.md +++ b/docs/exceptions/exceptions-spans.md @@ -35,7 +35,6 @@ This event describes a single exception. |---|---|---|---|---|---| | [`exception.message`](/docs/registry/attributes/exception.md) | string | The exception message. | `Division by zero`; `Can't convert 'int' object to str implicitly` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`exception.type`](/docs/registry/attributes/exception.md) | string | The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. | `java.net.ConnectException`; `OSError` | `Conditionally Required` [2] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | -| [`exception.escaped`](/docs/registry/attributes/exception.md) | boolean | Indicates that the exception is escaping the scope of the span. | | `Recommended` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
It's no longer recommended to record exceptions that are handled and do not escape the scope of a span. | | [`exception.stacktrace`](/docs/registry/attributes/exception.md) | string | A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. | `Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1] `exception.message`:** Required if `exception.type` is not set, recommended otherwise. diff --git a/docs/general/attribute-deprecation-action.md b/docs/general/attribute-deprecation-action.md new file mode 100644 index 0000000000..789c9cddc1 --- /dev/null +++ b/docs/general/attribute-deprecation-action.md @@ -0,0 +1,113 @@ +# Attribute deprecation actions + +**Status**: [Stable][DocumentStatus] + +
+Table of Contents + + + +- [Migrate](#migrate) + - [Stable Instrumentation](#stable-instrumentation) + - [Long-term Unstable Instrumentation](#long-term-unstable-instrumentation) + - [Unstable Instrumentation](#unstable-instrumentation) +- [Rename](#rename) +- [Remove](#remove) + - [Stable Instrumentation](#stable-instrumentation-1) + - [Long-term Unstable Instrumentation](#long-term-unstable-instrumentation-1) + - [Unstable Instrumentation](#unstable-instrumentation-1) +- [Update](#update) +- [Drop](#drop) + + + +
+ +## Migrate + +The migrate action helps to facilitate a tranisition +from a deprecated attribute to the replacement attribute. +Under no circumstances should this attribute be added to an existing instrumentation. + +The type of instrumentation helps to determine how the attribute should be handled, see below. + +### Stable Instrumentation + +Should continue emitting the attribute unless: + +* User has set the domain e.g. `database` via the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable. +* User has excluded the attribute via explicit configuration +* The instrumentation bumps its major version but will continue providing security patches for +the previous major version for at least 6 months. + +The [Drop Action](#drop) can occur when the major version is bumped provided that the previous major version will/has received 6 months of security patches from the time the replacement attribute is introduced. + +### Long-term Unstable Instrumentation + +> [!NOTE] +> Examples of long term unstable instrumentation, would be the OpenTelemetry Contrib packages as +> their stability is following that of the signal they are implementing. + +Should stop emitting the attribute unless: + +* User has set the domain e.g. `database/dup` via the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable. +* User has included the attribute via explicit configuration + +The [Drop Action](#drop) can occur when the deployment level of the package changes. +For instance a beta package moves to release candidate. + +### Unstable Instrumentation + +Should follow the definition of the [Drop Action](#drop) for how to proceed. + +## Rename + +The implementation is able to rename the attribute currently being emitted without needing to support the existing attribute anymore. + +This equivalent to adding a new attribute and performing the [Drop Action](#drop) on the old attribute. + +## Remove + +The remove action helps to facilitate the removal of a deprecated attribute. +Under no circumstances should this attribute be added to an existing instrumentation. + +The type of instrumentation helps to determine how the attribute should be handled, see below. + +### Stable Instrumentation + +Should continue emitting the attribute unless: + +* User has excluded the attribute via explicit configuration +* The instrumentation bumps its major version but will continue providing security patches for +the previous major version for at least 6 months. + +The [Drop Action](#drop) can occur when the major version is bumped provided that previous major version will/has +received 6 months of security patches from the time that the default behaviour was changed to not emit. + +### Long-term Unstable Instrumentation + +Should stop emitting the attribute unless: + +* User has included the attribute via explicit configuration + +The [Drop Action](#drop) can occur when the deployment level of the package changes. For instance a beta package moves to release candidate. + +### Unstable Instrumentation + +Should follow the definition of the [Drop Action](#drop) for how to proceed. + +## Update + +The update action indicates that the replacement attribute is not just a rename of the existing attribute but something more. +This could be a split of the value into multiple attributes, change in units/type of the value or something else. +The deprecation note should provide more details of the change required and it is assumed that this action behaves just like the [Migrate action](#migrate) unless stated otherwise. + +## Drop + +The drop action is where an attribute can be removed from the implementation so that the signal will not natively emit that attribute again. +There is no ability for a user to configure that attribute to be emitted. + +Under no circumstances should this attribute be added to an existing instrumentation. + +[DocumentStatus]: + https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/registry/attributes/messaging.md b/docs/registry/attributes/messaging.md index 362c111201..8107830fbb 100644 --- a/docs/registry/attributes/messaging.md +++ b/docs/registry/attributes/messaging.md @@ -196,6 +196,12 @@ Describes deprecated messaging attributes. | `messaging.kafka.consumer.group` | string | Deprecated, use `messaging.consumer.group.name` instead. | `my-group` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `messaging.consumer.group.name`. | | `messaging.kafka.destination.partition` | int | Deprecated, use `messaging.destination.partition.id` instead. | `2` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Record string representation of the partition id in `messaging.destination.partition.id` attribute. | | `messaging.kafka.message.offset` | int | Deprecated, use `messaging.kafka.offset` instead. | `42` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `messaging.kafka.offset`. | +| `messaging.message.payload_compressed_size_bytes` | int | The compressed size of the message payload in bytes. [11] | `2048` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Obsoleted. | +| `messaging.message.payload_size_bytes` | int | The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. [12] | `2738` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `messaging.message.envelope.size`. | | `messaging.operation` | string | Deprecated, use `messaging.operation.type` instead. | `publish`; `create`; `process` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `messaging.operation.type`. | | `messaging.rocketmq.client_group` | string | Deprecated, use `messaging.consumer.group.name` instead. | `myConsumerGroup` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans. | | `messaging.servicebus.destination.subscription_name` | string | Deprecated, use `messaging.destination.subscription.name` instead. | `subscription-a` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Replaced by `messaging.destination.subscription.name`. | + +**[11] `messaging.message.payload_compressed_size_bytes`:** Only if span represents operation on a single message. + +**[12] `messaging.message.payload_size_bytes`:** Only if span represents operation on a single message. diff --git a/docs/registry/namespaces/android/upgrade.md b/docs/registry/namespaces/android/upgrade.md new file mode 100644 index 0000000000..4069322dd2 --- /dev/null +++ b/docs/registry/namespaces/android/upgrade.md @@ -0,0 +1,6 @@ + + + +# Android + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/app/upgrade.md b/docs/registry/namespaces/app/upgrade.md new file mode 100644 index 0000000000..11ba02e2cc --- /dev/null +++ b/docs/registry/namespaces/app/upgrade.md @@ -0,0 +1,6 @@ + + + +# App + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/aspnetcore/upgrade.md b/docs/registry/namespaces/aspnetcore/upgrade.md new file mode 100644 index 0000000000..e5f3f94d5e --- /dev/null +++ b/docs/registry/namespaces/aspnetcore/upgrade.md @@ -0,0 +1,6 @@ + + + +# Aspnetcore + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/aws/upgrade.md b/docs/registry/namespaces/aws/upgrade.md new file mode 100644 index 0000000000..a3d80b009d --- /dev/null +++ b/docs/registry/namespaces/aws/upgrade.md @@ -0,0 +1,6 @@ + + + +# AWS + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/az/upgrade.md b/docs/registry/namespaces/az/upgrade.md new file mode 100644 index 0000000000..46832313be --- /dev/null +++ b/docs/registry/namespaces/az/upgrade.md @@ -0,0 +1,26 @@ + + + +# Az + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Event + +### Event: `az.resource.log` + +**Reason:** Replaced by `azure.resource.log`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | az.resource.log | azure.resource.log | + +Note: You will need to check what other attributes/properties need to be updated. + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| az.service_request_id | `Rename` | azure.service.request.id | Replaced by `azure.service.request.id`. | diff --git a/docs/registry/namespaces/azure/upgrade.md b/docs/registry/namespaces/azure/upgrade.md new file mode 100644 index 0000000000..67ad4da795 --- /dev/null +++ b/docs/registry/namespaces/azure/upgrade.md @@ -0,0 +1,6 @@ + + + +# Azure + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/browser/upgrade.md b/docs/registry/namespaces/browser/upgrade.md new file mode 100644 index 0000000000..89f9004b52 --- /dev/null +++ b/docs/registry/namespaces/browser/upgrade.md @@ -0,0 +1,6 @@ + + + +# Browser + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/cicd/upgrade.md b/docs/registry/namespaces/cicd/upgrade.md new file mode 100644 index 0000000000..a30e1c28b7 --- /dev/null +++ b/docs/registry/namespaces/cicd/upgrade.md @@ -0,0 +1,6 @@ + + + +# CICD + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/cli/upgrade.md b/docs/registry/namespaces/cli/upgrade.md new file mode 100644 index 0000000000..fe9b0e58de --- /dev/null +++ b/docs/registry/namespaces/cli/upgrade.md @@ -0,0 +1,6 @@ + + + +# Cli + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/cloud/upgrade.md b/docs/registry/namespaces/cloud/upgrade.md new file mode 100644 index 0000000000..915555bf4a --- /dev/null +++ b/docs/registry/namespaces/cloud/upgrade.md @@ -0,0 +1,6 @@ + + + +# Cloud + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/cloudfoundry/upgrade.md b/docs/registry/namespaces/cloudfoundry/upgrade.md new file mode 100644 index 0000000000..72f544459d --- /dev/null +++ b/docs/registry/namespaces/cloudfoundry/upgrade.md @@ -0,0 +1,6 @@ + + + +# CloudFoundry + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/container/upgrade.md b/docs/registry/namespaces/container/upgrade.md new file mode 100644 index 0000000000..80979a3bb9 --- /dev/null +++ b/docs/registry/namespaces/container/upgrade.md @@ -0,0 +1,6 @@ + + + +# Container + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/cpu/upgrade.md b/docs/registry/namespaces/cpu/upgrade.md new file mode 100644 index 0000000000..cb5ac60dc3 --- /dev/null +++ b/docs/registry/namespaces/cpu/upgrade.md @@ -0,0 +1,44 @@ + + + +# CPU + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Metric + +### Metric: `cpu.time` + +**Reason:** Replaced by `system.cpu.time`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | cpu.time | system.cpu.time | + +Note: You will need to check what other attributes/properties need to be updated. + +### Metric: `cpu.utilization` + +**Reason:** Replaced by `system.cpu.utilization`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | cpu.utilization | system.cpu.utilization | + +Note: You will need to check what other attributes/properties need to be updated. + +### Metric: `cpu.frequency` + +**Reason:** Replaced by `system.cpu.frequency`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | cpu.frequency | system.cpu.frequency | + +Note: You will need to check what other attributes/properties need to be updated. diff --git a/docs/registry/namespaces/cpython/upgrade.md b/docs/registry/namespaces/cpython/upgrade.md new file mode 100644 index 0000000000..19829d81f4 --- /dev/null +++ b/docs/registry/namespaces/cpython/upgrade.md @@ -0,0 +1,6 @@ + + + +# CPython + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/db/upgrade.md b/docs/registry/namespaces/db/upgrade.md new file mode 100644 index 0000000000..dd7d1f946e --- /dev/null +++ b/docs/registry/namespaces/db/upgrade.md @@ -0,0 +1,196 @@ + + + +# DB + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Metric + +### Metric: `db.client.connections.usage` + +**Reason:** Replaced by `db.client.connection.count`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | db.client.connections.usage | db.client.connection.count | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.client.connections.pool.name | `Rename` | db.client.connection.pool.name | Replaced by `db.client.connection.pool.name`. | +| db.client.connections.state | `Rename` | db.client.connection.state | Replaced by `db.client.connection.state`. | + +### Metric: `db.client.connections.idle.max` + +**Reason:** Replaced by `db.client.connection.idle.max`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | db.client.connections.idle.max | db.client.connection.idle.max | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.client.connections.pool.name | `Rename` | db.client.connection.pool.name | Replaced by `db.client.connection.pool.name`. | + +### Metric: `db.client.connections.idle.min` + +**Reason:** Replaced by `db.client.connection.idle.min`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | db.client.connections.idle.min | db.client.connection.idle.min | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.client.connections.pool.name | `Rename` | db.client.connection.pool.name | Replaced by `db.client.connection.pool.name`. | + +### Metric: `db.client.connections.max` + +**Reason:** Replaced by `db.client.connection.max`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | db.client.connections.max | db.client.connection.max | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.client.connections.pool.name | `Rename` | db.client.connection.pool.name | Replaced by `db.client.connection.pool.name`. | + +### Metric: `db.client.connections.pending_requests` + +**Reason:** Replaced by `db.client.connection.pending_requests`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | db.client.connections.pending_requests | db.client.connection.pending_requests | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.client.connections.pool.name | `Rename` | db.client.connection.pool.name | Replaced by `db.client.connection.pool.name`. | + +### Metric: `db.client.connections.timeouts` + +**Reason:** Replaced by `db.client.connection.timeouts`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | db.client.connections.timeouts | db.client.connection.timeouts | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.client.connections.pool.name | `Rename` | db.client.connection.pool.name | Replaced by `db.client.connection.pool.name`. | + +### Metric: `db.client.connections.create_time` + +**Reason:** Replaced by `db.client.connection.create_time` with unit `s`. + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.client.connections.pool.name | `Rename` | db.client.connection.pool.name | Replaced by `db.client.connection.pool.name`. | + +### Metric: `db.client.connections.wait_time` + +**Reason:** Replaced by `db.client.connection.wait_time` with unit `s`. + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.client.connections.pool.name | `Rename` | db.client.connection.pool.name | Replaced by `db.client.connection.pool.name`. | + +### Metric: `db.client.connections.use_time` + +**Reason:** Replaced by `db.client.connection.use_time` with unit `s`. + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.client.connections.pool.name | `Rename` | db.client.connection.pool.name | Replaced by `db.client.connection.pool.name`. | + +### Metric: `db.client.cosmosdb.operation.request_charge` + +**Reason:** Replaced by `azure.cosmosdb.client.operation.request_charge`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | db.client.cosmosdb.operation.request_charge | azure.cosmosdb.client.operation.request_charge | + +Note: You will need to check what other attributes/properties need to be updated. + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.cosmosdb.consistency_level | `Rename` | azure.cosmosdb.consistency.level | Replaced by `azure.cosmosdb.consistency.level`. | +| db.cosmosdb.regions_contacted | `Rename` | azure.cosmosdb.operation.contacted_regions | Replaced by `azure.cosmosdb.operation.contacted_regions`. | +| db.cosmosdb.sub_status_code | `Rename` | azure.cosmosdb.response.sub_status_code | Replaced by `azure.cosmosdb.response.sub_status_code`. | + +### Metric: `db.client.cosmosdb.active_instance.count` + +**Reason:** Replaced by `azure.cosmosdb.client.active_instance.count`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | db.client.cosmosdb.active_instance.count | azure.cosmosdb.client.active_instance.count | + +Note: You will need to check what other attributes/properties need to be updated. + +### Metric: `db.client.operation.duration` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.system | `Rename` | db.system.name | Replaced by `db.system.name`. | + +### Metric: `db.client.response.returned_rows` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.system | `Rename` | db.system.name | Replaced by `db.system.name`. | + +## Span + +### Span: `span.db.client` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| db.connection_string | `Update` | | Replaced by `server.address` and `server.port`. | +| db.instance.id | `Drop` | | Removed, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. | +| db.system | `Rename` | db.system.name | Replaced by `db.system.name`. | +| db.user | `Drop` | | Removed, no replacement at this time. | diff --git a/docs/registry/namespaces/deployment/upgrade.md b/docs/registry/namespaces/deployment/upgrade.md new file mode 100644 index 0000000000..5957c456fb --- /dev/null +++ b/docs/registry/namespaces/deployment/upgrade.md @@ -0,0 +1,6 @@ + + + +# Deployment + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/device/upgrade.md b/docs/registry/namespaces/device/upgrade.md new file mode 100644 index 0000000000..2b038491a6 --- /dev/null +++ b/docs/registry/namespaces/device/upgrade.md @@ -0,0 +1,6 @@ + + + +# Device + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/dns/upgrade.md b/docs/registry/namespaces/dns/upgrade.md new file mode 100644 index 0000000000..cdd4ecbee9 --- /dev/null +++ b/docs/registry/namespaces/dns/upgrade.md @@ -0,0 +1,6 @@ + + + +# DNS + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/dotnet/upgrade.md b/docs/registry/namespaces/dotnet/upgrade.md new file mode 100644 index 0000000000..5c9d83d156 --- /dev/null +++ b/docs/registry/namespaces/dotnet/upgrade.md @@ -0,0 +1,6 @@ + + + +# Dotnet + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/dynamodb/upgrade.md b/docs/registry/namespaces/dynamodb/upgrade.md new file mode 100644 index 0000000000..c3aa2294ad --- /dev/null +++ b/docs/registry/namespaces/dynamodb/upgrade.md @@ -0,0 +1,6 @@ + + + +# DynamoDB + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/exception/upgrade.md b/docs/registry/namespaces/exception/upgrade.md new file mode 100644 index 0000000000..f7c19e459f --- /dev/null +++ b/docs/registry/namespaces/exception/upgrade.md @@ -0,0 +1,16 @@ + + + +# Exception + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Event + +### Event: `exception` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| exception.escaped | `Drop` | | It's no longer recommended to record exceptions that are handled and do not escape the scope of a span. | diff --git a/docs/registry/namespaces/faas/upgrade.md b/docs/registry/namespaces/faas/upgrade.md new file mode 100644 index 0000000000..bd1c8edd5b --- /dev/null +++ b/docs/registry/namespaces/faas/upgrade.md @@ -0,0 +1,6 @@ + + + +# Faas + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/feature-flag/upgrade.md b/docs/registry/namespaces/feature-flag/upgrade.md new file mode 100644 index 0000000000..9c79795b22 --- /dev/null +++ b/docs/registry/namespaces/feature-flag/upgrade.md @@ -0,0 +1,6 @@ + + + +# Feature Flag + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/gcp/upgrade.md b/docs/registry/namespaces/gcp/upgrade.md new file mode 100644 index 0000000000..e2e02cd311 --- /dev/null +++ b/docs/registry/namespaces/gcp/upgrade.md @@ -0,0 +1,6 @@ + + + +# GCP + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/gen-ai/upgrade.md b/docs/registry/namespaces/gen-ai/upgrade.md new file mode 100644 index 0000000000..725c8c59eb --- /dev/null +++ b/docs/registry/namespaces/gen-ai/upgrade.md @@ -0,0 +1,58 @@ + + + +# Gen AI + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Event + +### Event: `gen_ai.system.message` + +**Reason:** Chat history is reported on `gen_ai.system_instructions` attribute on spans or `gen_ai.client.inference.operation.details` event. + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| gen_ai.system | `Rename` | gen_ai.provider.name | Replaced by `gen_ai.provider.name`. | + +### Event: `gen_ai.user.message` + +**Reason:** Chat history is reported on `gen_ai.input.messages` attribute on spans or `gen_ai.client.inference.operation.details` event. + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| gen_ai.system | `Rename` | gen_ai.provider.name | Replaced by `gen_ai.provider.name`. | + +### Event: `gen_ai.assistant.message` + +**Reason:** Chat history is reported on `gen_ai.input.messages` attribute on spans or `gen_ai.client.inference.operation.details` event. + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| gen_ai.system | `Rename` | gen_ai.provider.name | Replaced by `gen_ai.provider.name`. | + +### Event: `gen_ai.tool.message` + +**Reason:** Chat history is reported on `gen_ai.input.messages` attribute on spans or `gen_ai.client.inference.operation.details` event. + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| gen_ai.system | `Rename` | gen_ai.provider.name | Replaced by `gen_ai.provider.name`. | + +### Event: `gen_ai.choice` + +**Reason:** Chat history is reported on `gen_ai.output.messages` attribute on spans or `gen_ai.client.inference.operation.details` event. + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| gen_ai.system | `Rename` | gen_ai.provider.name | Replaced by `gen_ai.provider.name`. | diff --git a/docs/registry/namespaces/go/upgrade.md b/docs/registry/namespaces/go/upgrade.md new file mode 100644 index 0000000000..53e31c6cbb --- /dev/null +++ b/docs/registry/namespaces/go/upgrade.md @@ -0,0 +1,6 @@ + + + +# Go + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/graphql/upgrade.md b/docs/registry/namespaces/graphql/upgrade.md new file mode 100644 index 0000000000..7d312d90d5 --- /dev/null +++ b/docs/registry/namespaces/graphql/upgrade.md @@ -0,0 +1,6 @@ + + + +# GraphQL + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/heroku/upgrade.md b/docs/registry/namespaces/heroku/upgrade.md new file mode 100644 index 0000000000..cb43093e02 --- /dev/null +++ b/docs/registry/namespaces/heroku/upgrade.md @@ -0,0 +1,6 @@ + + + +# Heroku + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/host/upgrade.md b/docs/registry/namespaces/host/upgrade.md new file mode 100644 index 0000000000..f7f6d5f243 --- /dev/null +++ b/docs/registry/namespaces/host/upgrade.md @@ -0,0 +1,6 @@ + + + +# Host + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/http/upgrade.md b/docs/registry/namespaces/http/upgrade.md new file mode 100644 index 0000000000..7844818133 --- /dev/null +++ b/docs/registry/namespaces/http/upgrade.md @@ -0,0 +1,37 @@ + + + +# HTTP + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Metric + +### Metric: `http.server.active_requests` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| http.method | `Rename` | http.request.method | Replaced by `http.request.method`. | +| http.scheme | `Rename` | url.scheme | Replaced by `url.scheme`. | +| net.host.name | `Rename` | server.address | Replaced by `server.address`. | +| net.host.port | `Rename` | server.port | Replaced by `server.port`. | + +## Span + +### Span: `span.http.client` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| http.method | `Rename` | http.request.method | Replaced by `http.request.method`. | + +### Span: `span.http.server` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| http.method | `Rename` | http.request.method | Replaced by `http.request.method`. | diff --git a/docs/registry/namespaces/hw/upgrade.md b/docs/registry/namespaces/hw/upgrade.md new file mode 100644 index 0000000000..8ad1da8849 --- /dev/null +++ b/docs/registry/namespaces/hw/upgrade.md @@ -0,0 +1,6 @@ + + + +# Hw + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/jvm/upgrade.md b/docs/registry/namespaces/jvm/upgrade.md new file mode 100644 index 0000000000..16ec33bc78 --- /dev/null +++ b/docs/registry/namespaces/jvm/upgrade.md @@ -0,0 +1,18 @@ + + + +# JVM + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Metric + +### Metric: `jvm.buffer.memory.usage` + +**Reason:** Replaced by `jvm.buffer.memory.used`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | jvm.buffer.memory.usage | jvm.buffer.memory.used | diff --git a/docs/registry/namespaces/k8s/upgrade.md b/docs/registry/namespaces/k8s/upgrade.md new file mode 100644 index 0000000000..dd772a084d --- /dev/null +++ b/docs/registry/namespaces/k8s/upgrade.md @@ -0,0 +1,28 @@ + + + +# K8s + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Metric + +### Metric: `k8s.replication_controller.desired_pods` + +**Reason:** Replaced by `k8s.replicationcontroller.desired_pods`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | k8s.replication_controller.desired_pods | k8s.replicationcontroller.desired_pods | + +### Metric: `k8s.replication_controller.available_pods` + +**Reason:** Replaced by `k8s.replicationcontroller.available_pods`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | k8s.replication_controller.available_pods | k8s.replicationcontroller.available_pods | diff --git a/docs/registry/namespaces/kestrel/upgrade.md b/docs/registry/namespaces/kestrel/upgrade.md new file mode 100644 index 0000000000..c57dea2043 --- /dev/null +++ b/docs/registry/namespaces/kestrel/upgrade.md @@ -0,0 +1,6 @@ + + + +# Kestrel + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/messaging/upgrade.md b/docs/registry/namespaces/messaging/upgrade.md new file mode 100644 index 0000000000..3e5367a54b --- /dev/null +++ b/docs/registry/namespaces/messaging/upgrade.md @@ -0,0 +1,136 @@ + + + +# Messaging + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Metric + +### Metric: `messaging.publish.duration` + +**Reason:** Replaced by `messaging.client.operation.duration`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | messaging.publish.duration | messaging.client.operation.duration | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| messaging.operation | `Migrate` | messaging.operation.type | Replaced by `messaging.operation.type`. | + +### Metric: `messaging.receive.duration` + +**Reason:** Replaced by `messaging.client.operation.duration`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | messaging.receive.duration | messaging.client.operation.duration | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| messaging.operation | `Migrate` | messaging.operation.type | Replaced by `messaging.operation.type`. | + +### Metric: `messaging.process.messages` + +**Reason:** Replaced by `messaging.client.consumed.messages`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | messaging.process.messages | messaging.client.consumed.messages | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| messaging.operation | `Migrate` | messaging.operation.type | Replaced by `messaging.operation.type`. | + +### Metric: `messaging.publish.messages` + +**Reason:** Replaced by `messaging.client.sent.messages`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | messaging.publish.messages | messaging.client.sent.messages | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| messaging.operation | `Migrate` | messaging.operation.type | Replaced by `messaging.operation.type`. | + +### Metric: `messaging.receive.messages` + +**Reason:** Replaced by `messaging.client.consumed.messages`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | messaging.receive.messages | messaging.client.consumed.messages | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| messaging.operation | `Migrate` | messaging.operation.type | Replaced by `messaging.operation.type`. | + +### Metric: `messaging.client.published.messages` + +**Reason:** Replaced by `messaging.client.sent.messages`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | messaging.client.published.messages | messaging.client.sent.messages | + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| messaging.operation | `Migrate` | messaging.operation.type | Replaced by `messaging.operation.type`. | + +### Metric: `messaging.client.operation.duration` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| messaging.operation | `Migrate` | messaging.operation.type | Replaced by `messaging.operation.type`. | + +### Metric: `messaging.process.duration` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| messaging.operation | `Migrate` | messaging.operation.name | Replaced by `messaging.operation.name`. | + +### Metric: `messaging.client.sent.messages` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| messaging.operation | `Migrate` | messaging.operation.name | Replaced by `messaging.operation.name`. | + +### Metric: `messaging.client.consumed.messages` + +#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +| messaging.operation | `Migrate` | messaging.operation.name | Replaced by `messaging.operation.name`. | diff --git a/docs/registry/namespaces/nfs/upgrade.md b/docs/registry/namespaces/nfs/upgrade.md new file mode 100644 index 0000000000..962d006bda --- /dev/null +++ b/docs/registry/namespaces/nfs/upgrade.md @@ -0,0 +1,6 @@ + + + +# NFS + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/nodejs/upgrade.md b/docs/registry/namespaces/nodejs/upgrade.md new file mode 100644 index 0000000000..47db578cf6 --- /dev/null +++ b/docs/registry/namespaces/nodejs/upgrade.md @@ -0,0 +1,6 @@ + + + +# NodeJS + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/openai/upgrade.md b/docs/registry/namespaces/openai/upgrade.md new file mode 100644 index 0000000000..a7219a4c08 --- /dev/null +++ b/docs/registry/namespaces/openai/upgrade.md @@ -0,0 +1,6 @@ + + + +# OpenAI + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/os/upgrade.md b/docs/registry/namespaces/os/upgrade.md new file mode 100644 index 0000000000..a7fd3315c6 --- /dev/null +++ b/docs/registry/namespaces/os/upgrade.md @@ -0,0 +1,6 @@ + + + +# OS + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/otel/upgrade.md b/docs/registry/namespaces/otel/upgrade.md new file mode 100644 index 0000000000..e1044b129d --- /dev/null +++ b/docs/registry/namespaces/otel/upgrade.md @@ -0,0 +1,64 @@ + + + +# OTel + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Entity + +### Entity: `otel.scope` + +**Reason:** Obsoleted. + +## Metric + +### Metric: `otel.sdk.span.live.count` + +**Reason:** Replaced by `otel.sdk.span.live`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | otel.sdk.span.live.count | otel.sdk.span.live | + +### Metric: `otel.sdk.span.ended.count` + +**Reason:** Obsoleted. + +### Metric: `otel.sdk.processor.span.processed.count` + +**Reason:** Replaced by `otel.sdk.processor.span.processed`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | otel.sdk.processor.span.processed.count | otel.sdk.processor.span.processed | +| Instrument | updowncounter | counter | + +### Metric: `otel.sdk.exporter.span.inflight.count` + +**Reason:** Replaced by `otel.sdk.exporter.span.inflight`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | otel.sdk.exporter.span.inflight.count | otel.sdk.exporter.span.inflight | + +### Metric: `otel.sdk.exporter.span.exported.count` + +**Reason:** Replaced by `otel.sdk.exporter.span.exported`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | otel.sdk.exporter.span.exported.count | otel.sdk.exporter.span.exported | +| Instrument | updowncounter | counter | + +### Metric: `otel.sdk.span.ended` + +**Reason:** Obsoleted. diff --git a/docs/registry/namespaces/process/upgrade.md b/docs/registry/namespaces/process/upgrade.md new file mode 100644 index 0000000000..134c314118 --- /dev/null +++ b/docs/registry/namespaces/process/upgrade.md @@ -0,0 +1,6 @@ + + + +# Process + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/rpc/upgrade.md b/docs/registry/namespaces/rpc/upgrade.md new file mode 100644 index 0000000000..8abe336d67 --- /dev/null +++ b/docs/registry/namespaces/rpc/upgrade.md @@ -0,0 +1,6 @@ + + + +# RPC + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/service/upgrade.md b/docs/registry/namespaces/service/upgrade.md new file mode 100644 index 0000000000..9203a202d2 --- /dev/null +++ b/docs/registry/namespaces/service/upgrade.md @@ -0,0 +1,6 @@ + + + +# Service + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/session/upgrade.md b/docs/registry/namespaces/session/upgrade.md new file mode 100644 index 0000000000..34b14d90da --- /dev/null +++ b/docs/registry/namespaces/session/upgrade.md @@ -0,0 +1,6 @@ + + + +# Session + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/signalr/upgrade.md b/docs/registry/namespaces/signalr/upgrade.md new file mode 100644 index 0000000000..302cd8e2ca --- /dev/null +++ b/docs/registry/namespaces/signalr/upgrade.md @@ -0,0 +1,6 @@ + + + +# SignalR + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/system/upgrade.md b/docs/registry/namespaces/system/upgrade.md new file mode 100644 index 0000000000..b0017a862f --- /dev/null +++ b/docs/registry/namespaces/system/upgrade.md @@ -0,0 +1,18 @@ + + + +# System + +The upgrade process helps to document what is needed to upgrade the signals to the latest version. + +## Metric + +### Metric: `system.network.connections` + +**Reason:** Replaced by `system.network.connection.count`. + +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +| Name | system.network.connections | system.network.connection.count | diff --git a/docs/registry/namespaces/telemetry/upgrade.md b/docs/registry/namespaces/telemetry/upgrade.md new file mode 100644 index 0000000000..39d5c9847c --- /dev/null +++ b/docs/registry/namespaces/telemetry/upgrade.md @@ -0,0 +1,6 @@ + + + +# Telemetry + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/v8js/upgrade.md b/docs/registry/namespaces/v8js/upgrade.md new file mode 100644 index 0000000000..491a85bb81 --- /dev/null +++ b/docs/registry/namespaces/v8js/upgrade.md @@ -0,0 +1,6 @@ + + + +# V8js + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/vcs/upgrade.md b/docs/registry/namespaces/vcs/upgrade.md new file mode 100644 index 0000000000..833045021a --- /dev/null +++ b/docs/registry/namespaces/vcs/upgrade.md @@ -0,0 +1,6 @@ + + + +# VCS + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/webengine/upgrade.md b/docs/registry/namespaces/webengine/upgrade.md new file mode 100644 index 0000000000..1b46ff7e5c --- /dev/null +++ b/docs/registry/namespaces/webengine/upgrade.md @@ -0,0 +1,6 @@ + + + +# Webengine + +No upgrade process is documented as no deprecations can be found. diff --git a/docs/registry/namespaces/zos/upgrade.md b/docs/registry/namespaces/zos/upgrade.md new file mode 100644 index 0000000000..7aa85efa34 --- /dev/null +++ b/docs/registry/namespaces/zos/upgrade.md @@ -0,0 +1,6 @@ + + + +# zOS + +No upgrade process is documented as no deprecations can be found. diff --git a/model/database/metrics.yaml b/model/database/metrics.yaml index 7498261e97..f54f6247c3 100644 --- a/model/database/metrics.yaml +++ b/model/database/metrics.yaml @@ -13,6 +13,7 @@ groups: stability: stable extends: attributes.db.client.with_query_and_collection attributes: + - ref: db.system - ref: db.system.name # TODO: Not adding to the minimal because of https://github.com/open-telemetry/weaver/issues/479 requirement_level: required @@ -177,6 +178,7 @@ groups: stability: development extends: attributes.db.client.with_query_and_collection attributes: + - ref: db.system - ref: db.system.name # TODO: Not adding to the minimal because of https://github.com/open-telemetry/weaver/issues/479 requirement_level: required diff --git a/model/database/spans.yaml b/model/database/spans.yaml index 70b1bd9c85..2b7193ca6c 100644 --- a/model/database/spans.yaml +++ b/model/database/spans.yaml @@ -94,6 +94,7 @@ groups: - ref: network.peer.port requirement_level: recommended: if and only if `network.peer.address` is set. + - ref: db.system - ref: db.system.name sampling_relevant: true # TODO: Not adding to the minimal because of https://github.com/open-telemetry/weaver/issues/479 @@ -105,6 +106,9 @@ groups: - ref: db.stored_procedure.name requirement_level: recommended: If operation applies to a specific stored procedure. + - ref: db.connection_string + - ref: db.instance.id + - ref: db.user - id: span.db.client type: span diff --git a/model/http/metrics.yaml b/model/http/metrics.yaml index 3e1ba5fda5..eaebb31c14 100644 --- a/model/http/metrics.yaml +++ b/model/http/metrics.yaml @@ -59,8 +59,10 @@ groups: instrument: updowncounter unit: "{request}" attributes: + - ref: http.method - ref: http.request.method requirement_level: required + - ref: http.scheme - ref: url.scheme requirement_level: required examples: ["http", "https"] @@ -82,6 +84,8 @@ groups: > **Warning** > Since this attribute is based on HTTP headers, opting in to it may allow an attacker > to trigger cardinality limits, degrading the usefulness of the metric. + - ref: net.host.name + - ref: net.host.port - id: metric.http.server.request.body.size type: metric diff --git a/model/http/spans.yaml b/model/http/spans.yaml index dd49374df9..61b6d4fc85 100644 --- a/model/http/spans.yaml +++ b/model/http/spans.yaml @@ -23,6 +23,7 @@ groups: **Span status:** refer to the [Span Status](/docs/http/http-spans.md#status) section. attributes: + - ref: http.method - ref: http.request.method sampling_relevant: true - ref: http.request.method_original @@ -79,6 +80,7 @@ groups: **Span status:** refer to the [Span Status](/docs/http/http-spans.md#status) section. stability: stable attributes: + - ref: http.method - ref: http.request.method sampling_relevant: true - ref: http.request.method_original diff --git a/model/messaging/common.yaml b/model/messaging/common.yaml index 108b75445a..baa0dbdafc 100644 --- a/model/messaging/common.yaml +++ b/model/messaging/common.yaml @@ -17,3 +17,4 @@ groups: - ref: server.port - ref: messaging.operation.name requirement_level: required + - ref: messaging.operation diff --git a/model/messaging/deprecated/registry-deprecated.yaml b/model/messaging/deprecated/registry-deprecated.yaml index a543f7fb10..40c7b24d6e 100644 --- a/model/messaging/deprecated/registry-deprecated.yaml +++ b/model/messaging/deprecated/registry-deprecated.yaml @@ -5,6 +5,27 @@ groups: display_name: Deprecated Messaging Attributes brief: "Describes deprecated messaging attributes." attributes: + - id: messaging.message.payload_compressed_size_bytes + type: int + stability: development + deprecated: + reason: obsoleted + brief: > + The compressed size of the message payload in bytes. + note: | + Only if span represents operation on a single message. + examples: 2048 + - id: messaging.message.payload_size_bytes + type: int + stability: development + deprecated: + reason: renamed + renamed_to: messaging.message.envelope.size + brief: > + The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. + note: | + Only if span represents operation on a single message. + examples: 2738 - id: messaging.kafka.destination.partition type: int brief: > @@ -23,6 +44,8 @@ groups: deprecated: reason: renamed renamed_to: messaging.operation.type + annotations: + stability_envvar: true - id: messaging.client_id type: string stability: development diff --git a/model/messaging/metrics.yaml b/model/messaging/metrics.yaml index 12fc71e411..18e201e8e9 100644 --- a/model/messaging/metrics.yaml +++ b/model/messaging/metrics.yaml @@ -65,6 +65,10 @@ groups: attributes: - ref: messaging.operation.name examples: ["process", "consume", "handle"] + - ref: messaging.operation + deprecated: + reason: renamed + renamed_to: messaging.operation.name # counters - id: metric.messaging.client.sent.messages @@ -83,6 +87,10 @@ groups: attributes: - ref: messaging.operation.name examples: ["send", "schedule", "enqueue"] + - ref: messaging.operation + deprecated: + reason: renamed + renamed_to: messaging.operation.name - id: metric.messaging.client.consumed.messages type: metric @@ -104,3 +112,7 @@ groups: attributes: - ref: messaging.operation.name examples: ["receive", "peek", "poll", "consume"] + - ref: messaging.operation + deprecated: + reason: renamed + renamed_to: messaging.operation.name diff --git a/model/messaging/spans.yaml b/model/messaging/spans.yaml index 62e3293d7d..8ec42ee591 100644 --- a/model/messaging/spans.yaml +++ b/model/messaging/spans.yaml @@ -27,6 +27,10 @@ groups: # TODO: add messaging.system once https://github.com/open-telemetry/weaver/issues/479 is implemented # - ref: messaging.system # sampling_relevant: true + - ref: messaging.message.payload_compressed_size_bytes + - ref: messaging.message.payload_size_bytes + deprecated: + reason: obsoleted - id: messaging.attributes type: attribute_group # TODO: this should be a span - https://github.com/open-telemetry/semantic-conventions/issues/1891 diff --git a/templates/registry/markdown/attribute_table.j2 b/templates/registry/markdown/attribute_table.j2 index 5b862dbd31..1c9c1d24b6 100644 --- a/templates/registry/markdown/attribute_table.j2 +++ b/templates/registry/markdown/attribute_table.j2 @@ -6,7 +6,7 @@ {% import 'sampling_macros.j2' as sampling %} {% import 'examples_macros.j2' as examples %} {#- Macro for creating attribute table -#} -{% macro generate(attributes, tag_filter, attribute_registry_base_url, lineage_attributes) %}{% if (tag_filter | length == 0) %}{% set filtered_attributes = attributes %}{% else %}{% set filtered_attributes = attributes | selectattr("tag", "in", tag_filter) %}{% endif %}{% if (filtered_attributes is defined) and (filtered_attributes | length > 0) %}| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +{% macro generate(attributes, tag_filter, attribute_registry_base_url, lineage_attributes) %}{% if (tag_filter | length == 0) %}{% set filtered_attributes = attributes | rejectattr("deprecated") | attribute_sort %}{% else %}{% set filtered_attributes = attributes | rejectattr("deprecated") | selectattr("tag", "in", tag_filter) | attribute_sort %}{% endif %}{% if (filtered_attributes is defined) and (filtered_attributes | length > 0) %}| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| {% for attribute in filtered_attributes | attribute_sort %}| {{ attrs.name_with_link(attribute, attribute_registry_base_url, lineage_attributes) }} | {{ attrs.type(attribute) }} | {{ attribute.brief | trim }}{{ notes.add({"note": attribute.note, "name": attrs.name(attribute)}) }} | {{ examples.format(attribute) | trim }} | {{ requirement.render({"level": attribute.requirement_level, "name": attrs.name(attribute)}, notes) | trim }} | {{ stability.badge(attribute.stability, attribute.deprecated, attribute.brief) | trim }} | {% endfor %}{{ notes.render() }}{{ sampling.snippet(filtered_attributes, attribute_registry_base_url, lineage_attributes) }}{{ enums.tables(filtered_attributes | selectattr("type", "mapping"), notes) }} diff --git a/templates/registry/markdown/deprecation_action.j2 b/templates/registry/markdown/deprecation_action.j2 new file mode 100644 index 0000000000..13f58f0942 --- /dev/null +++ b/templates/registry/markdown/deprecation_action.j2 @@ -0,0 +1,9 @@ +{% macro render(attr, notes) -%} +{%- if attr.annotations is defined and attr.annotations.stability_envvar == true and attr.deprecated.reason | lower == "renamed" %}`Migrate` +{% elif (attr.annotations is not defined or attr.annotations.stability_envvar != true) and attr.deprecated.reason | lower == "renamed" %}`Rename` +{% elif attr.annotations is defined and attr.annotations.stability_envvar == true and attr.deprecated.reason | lower == "obsoleted" %}`Remove` +{% elif attr.deprecated.reason | lower == "obsoleted" %}`Drop` +{% elif attr.deprecated.reason | lower == "uncategorized" %}`Update` +{% else %}Unknown +{%- endif %} +{% endmacro %} diff --git a/templates/registry/markdown/upgrade_namespace.md.j2 b/templates/registry/markdown/upgrade_namespace.md.j2 new file mode 100644 index 0000000000..3daca71dbc --- /dev/null +++ b/templates/registry/markdown/upgrade_namespace.md.j2 @@ -0,0 +1,11 @@ + + +{%- import 'stability.j2' as stability -%} +{%- import 'attribute_macros.j2' as attrs -%} +{%- import 'deprecation_action.j2' as action -%} +{% import 'upgrade_table.j2' as upgrade %} + +# {{ ctx.id | title_case | acronym }} + +{{upgrade.signalBlocks(ctx.groups) | trim}} + diff --git a/templates/registry/markdown/upgrade_table.j2 b/templates/registry/markdown/upgrade_table.j2 new file mode 100644 index 0000000000..0a78e3f465 --- /dev/null +++ b/templates/registry/markdown/upgrade_table.j2 @@ -0,0 +1,123 @@ +{% import 'deprecation_action.j2' as action %} + +{% macro message (groups) %} + +{% if groups %} +The upgrade process helps to document what is needed to upgrade the signals to the latest version. +{% else %} +No upgrade process is documented as no deprecations can be found. +{% endif %} +{% endmacro %} + +{% macro signalBlocks(groups) %} + +{% set deprecatedSignals = namespace(signals = []) %} +{% set deprecatedSignals.signals = groups | selectattr("deprecated") %} + +{% for signal in groups | rejectattr("deprecated") | selectattr("attributes") %} +{% if signal.attributes | selectattr("deprecated") %} +{% set deprecatedSignals.signals = deprecatedSignals.signals + [signal] %} +{% endif %} +{% endfor %} + +{% set current = "" %} + +{{message(deprecatedSignals.signals) | trim}} +{% for signal in deprecatedSignals.signals | sort(attribute="type") %} +{{ signalBlock(current == signal.type, signal, groups) | trim }}{% if current != signal.type %}{% set current = signal.type %}{% endif %} +{% endfor %} +{% endmacro %} + +{% macro signalBlock(current, signal, groups) %} +{% set newSignal = {} %} +{% if signal.type == "metric" and signal.deprecated and signal.deprecated.reason == "renamed" %} +{% set newSignal = groups | selectattr("metric_name", 'equalto', signal.deprecated.renamed_to) | first %} +{% elif signal.type == "event" and signal.deprecated and signal.deprecated.reason == "renamed" %} +{% set newSignal = groups | selectattr("name", 'equalto', signal.deprecated.renamed_to) | first %} +{% elif signal.type == "entity" and signal.deprecated and signal.deprecated.reason == "renamed" %} +{% set newSignal = groups | selectattr("name", 'equalto', signal.deprecated.renamed_to) | first %} +{% elif signal.type == "span" and signal.deprecated and signal.deprecated.reason == "renamed" %} +{% set newSignal = groups | selectattr("id", 'equalto', signal.deprecated.renamed_to) | first %} +{% endif %} +{% if current == false %} +## {{signal.type | title_case}} +{% endif %} +### {{signal.type | title_case}}: `{% if signal.metric_name %}{{signal.metric_name}}{%elif signal.name %}{{signal.name}}{% else %}{{signal.id}}{%endif%}` + +{{changes(signal, newSignal) | trim }} +{% endmacro %} + +{% macro changes(signal, new)%} +{{propertyChanges(signal, new) | trim }} + +{{attributeChanges(signal, new) | trim }} +{% endmacro %} + +{% macro propertyChanges(signal, new)%} +{% if signal.deprecated %} +**Reason:** {{signal.deprecated.note }} +{% if signal.deprecated.reason == "renamed"%} +#### Property Changes + +| Property | Old Value | New Value | +| --- | --- | --- | +{{signalUpgrade(signal, new) | trim}} +{% endif %}{% endif %} + +{% endmacro %} + +{% macro attributeChanges(signal, new)%} + +{% set lines = signal.attributes | selectattr("deprecated")%} +{# if new and new.attributes #} +{# set lines = lines + (new.attributes | selectattr("deprecated")) | unique #} +{# endif #} +{% if lines %}#### Attribute Changes + +| Old Attribute Key | Action | New Attribute Key | Summary | +| --- | --- | --- | --- | +{% for attr in lines | unique | sort(attribute = "name") %}| {{attr.name}} | {{ action.render({"deprecated": attr.deprecated, "annotations": attr.annotations}, "") | trim}} | {{ attr.deprecated.renamed_to }} | {{ attr.deprecated.note | trim}} | +{% endfor %}{% endif %} +{% endmacro %} + +{% macro signalUpgrade(old, new)%} +{% if new is undefined %} +| Name | {% if old.metric_name %}{{old.metric_name}}{% elif old.name %}{{old.name}}{% else %}{{old.id}}{% endif %} | {{old.deprecated.renamed_to}} | + +Note: You will need to check what other attributes/properties need to be updated. + +{% elif old.type == "metric" and new.type == "metric"%} +{{metricUpgrade(old, new) | trim }} +{% elif old.type == "event" and new.type == "event"%} +{{eventUpgrade(old, new) | trim }} +{% elif old.type == "entity" and new.type == "entity"%} +{{entityUpgrade(old, new) | trim }} +{% elif old.type == "span" and new.type == "span"%} +{{spanUpgrade(old, new) | trim }} +{% else %} +Fix: {{old.type}} +{% endif %}{% endmacro %} + +{% macro metricUpgrade(old, new)%} +{{propertyUpgrade("Name", old.metric_name, new.metric_name) | trim}} +{{propertyUpgrade("Instrument", old.instrument, new.instrument) | trim}} +{{propertyUpgrade("Unit", old.unit, new.unit) | trim}} +{% endmacro %} + +{% macro eventUpgrade(old, new)%} +{{propertyUpgrade("Name", old.name, new.name) | trim}} +{% endmacro %} + +{% macro entityUpgrade(old, new)%} +{{propertyUpgrade("Name", old.name, new.name) | trim}} +{% endmacro %} + +{% macro spanUpgrade(old, new)%} +{{propertyUpgrade("Kind", old.kind, new.kind) | trim}} +{% endmacro %} + +{% macro propertyUpgrade(name, old, new)%} +{% if old != new %} +| {{name}} | {{old}} | {{new}} | +{% endif %} +{% endmacro %} \ No newline at end of file diff --git a/templates/registry/markdown/weaver.yaml b/templates/registry/markdown/weaver.yaml index e364b47d17..715fc086c7 100644 --- a/templates/registry/markdown/weaver.yaml +++ b/templates/registry/markdown/weaver.yaml @@ -19,6 +19,10 @@ templates: filter: '.groups | map(select(.type == "entity")) | group_by(.name | split(".") | .[0]) | map({id: .[0].id | split(".") | .[1], groups: .})' application_mode: each file_name: 'entities/{{ ctx.id | kebab_case }}.md' + - pattern: upgrade_namespace.md.j2 + filter: '.groups | map(select(.type != "attribute_group")) | group_by(.id | split(".") | .[1]) | map({id: .[0].id | split(".") | .[1], groups: .})' + application_mode: each + file_name: 'namespaces/{{ ctx.id | kebab_case }}/upgrade.md' acronyms: - AI - AWS