Skip to content

Commit

Permalink
[cicd] follow procedure for renaming attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-kamphaus-jemmic committed Oct 3, 2024
1 parent cfffb4f commit 0e02a47
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .chloggen/1372-vcs-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.*`.
22 changes: 22 additions & 0 deletions docs/attributes-registry/vcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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)<br>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)<br>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)<br>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)<br>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)<br>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) |
61 changes: 61 additions & 0 deletions model/vcs/deprecated/registry-deprecated.yaml
Original file line number Diff line number Diff line change
@@ -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"]
10 changes: 10 additions & 0 deletions schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0e02a47

Please sign in to comment.