diff --git a/.chloggen/1372-vcs-metrics.yaml b/.chloggen/1372-vcs-metrics.yaml index 8b1022cdd4..0fe1721203 100644 --- a/.chloggen/1372-vcs-metrics.yaml +++ b/.chloggen/1372-vcs-metrics.yaml @@ -4,7 +4,7 @@ # your pull request title with [chore] or use the "Skip Changelog" label. # One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement +change_type: breaking # The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) component: vcs @@ -19,4 +19,7 @@ issues: [1372] # (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: +subtext: | + - The VCS attribute `vcs.change.state` has been added to the registry. + - `vcs.repository.change.*` attributes have been deprecated and moved to `vcs.change.*`. + - `vcs.repository.ref.*` attributes have been deprecated and moved to `vcs.ref.*`. diff --git a/docs/attributes-registry/vcs.md b/docs/attributes-registry/vcs.md index 712d6f920d..4c5eb5c299 100644 --- a/docs/attributes-registry/vcs.md +++ b/docs/attributes-registry/vcs.md @@ -6,6 +6,9 @@ # VCS +- [VCS Repository Attributes](#vcs-repository-attributes) +- [VCS Deprecated Attributes](#vcs-deprecated-attributes) + ## VCS Repository Attributes This group defines the attributes for [Version Control Systems (VCS)](https://en.wikipedia.org/wiki/Version_control). @@ -45,3 +48,22 @@ based on the VCS system and situational context. | -------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- | | `branch` | [branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `tag` | [tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +## VCS Deprecated Attributes + +"Describes deprecated vcs attributes." + +| Attribute | Type | Description | Examples | Stability | +| ----------------------------- | ------ | ------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `vcs.repository.change.id` | string | Deprecated, use `vcs.change.id` instead. | `123` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, use `vcs.change.id` instead. | +| `vcs.repository.change.title` | string | Deprecated, use `vcs.change.title` instead. | `Fixes broken thing`; `feat: add my new feature`; `[chore] update dependency` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, use `vcs.change.title` instead. | +| `vcs.repository.ref.name` | string | Deprecated, use `vcs.ref.name` instead. | `my-feature-branch`; `tag-1-test` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, use `vcs.ref.name` instead. | +| `vcs.repository.ref.revision` | string | Deprecated, use `vcs.ref.revision` instead. | `9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc`; `main`; `123`; `HEAD` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, use `vcs.ref.revision` instead. | +| `vcs.repository.ref.type` | string | Deprecated, use `vcs.ref.type` instead. | `branch`; `tag` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)
Deprecated, use `vcs.ref.type` instead. | + +`vcs.repository.ref.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +| -------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- | +| `branch` | [branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `tag` | [tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/model/vcs/deprecated/registry-deprecated.yaml b/model/vcs/deprecated/registry-deprecated.yaml new file mode 100644 index 0000000000..a8273401ce --- /dev/null +++ b/model/vcs/deprecated/registry-deprecated.yaml @@ -0,0 +1,61 @@ +groups: + - id: registry.vcs.deprecated + type: attribute_group + brief: > + "Describes deprecated vcs attributes." + attributes: + - id: vcs.repository.ref.name + type: string + stability: experimental + deprecated: 'Deprecated, use `vcs.ref.name` instead.' + brief: > + Deprecated, use `vcs.ref.name` instead. + examples: ["my-feature-branch", "tag-1-test"] + - id: vcs.repository.ref.type + type: + members: + - id: branch + value: branch + brief: "[branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch)" + stability: experimental + - id: tag + value: tag + brief: "[tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag)" + stability: experimental + stability: experimental + deprecated: 'Deprecated, use `vcs.ref.type` instead.' + brief: > + Deprecated, use `vcs.ref.type` instead. + examples: ["branch", "tag"] + - id: vcs.repository.ref.revision + type: string + stability: experimental + deprecated: 'Deprecated, use `vcs.ref.revision` instead.' + brief: > + Deprecated, use `vcs.ref.revision` instead. + examples: + [ + "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc", + "main", + "123", + "HEAD", + ] + - id: vcs.repository.change.title + type: string + stability: experimental + deprecated: 'Deprecated, use `vcs.change.title` instead.' + brief: > + Deprecated, use `vcs.change.title` instead. + examples: + [ + "Fixes broken thing", + "feat: add my new feature", + "[chore] update dependency", + ] + - id: vcs.repository.change.id + type: string + stability: experimental + deprecated: 'Deprecated, use `vcs.change.id` instead.' + brief: > + Deprecated, use `vcs.change.id` instead. + examples: ["123"] diff --git a/schema-next.yaml b/schema-next.yaml index f16863d7df..556cbba4c4 100644 --- a/schema-next.yaml +++ b/schema-next.yaml @@ -2,6 +2,16 @@ file_format: 1.1.0 schema_url: https://opentelemetry.io/schemas/next versions: next: + all: + changes: + # https://github.com/open-telemetry/semantic-conventions/pull/1383 + - rename_attributes: + attribute_map: + vcs.repository.change.id: vcs.change.id + vcs.repository.change.title: vcs.change.title + vcs.repository.ref.name: vcs.ref.name + vcs.repository.ref.revision: vcs.ref.revision + vcs.repository.ref.type: vcs.ref.type 1.27.0: all: changes: