[vcs] add organization and provider name VCS attributes (#1997)

Signed-off-by: Afonso Fernandes <21228942+afonsonf@users.noreply.github.com>
Co-authored-by: Adriel Perkins <adriel@adrielperkins.com>
This commit is contained in:
Afonso Fernandes 2025-03-26 08:11:55 +00:00 committed by GitHub
parent e5ff72688a
commit c1d8d371e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 264 additions and 1 deletions

View File

@ -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: vcs
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add owner and provider name to VCS attribute registry
# 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: [1452]
# (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:

View File

@ -16,6 +16,8 @@ This group defines the attributes for [Version Control Systems (VCS)](https://wi
| <a id="vcs-change-state" href="#vcs-change-state">`vcs.change.state`</a> | string | The state of the change (pull request/merge request/changelist). | `open`; `closed`; `merged` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="vcs-change-title" href="#vcs-change-title">`vcs.change.title`</a> | string | The human readable title of the change (pull request/merge request/changelist). This title is often a brief summary of the change and may get merged in to a ref as the commit summary. | `Fixes broken thing`; `feat: add my new feature`; `[chore] update dependency` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="vcs-line-change-type" href="#vcs-line-change-type">`vcs.line_change.type`</a> | string | The type of line change being measured on a branch or change. | `added`; `removed` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="vcs-owner-name" href="#vcs-owner-name">`vcs.owner.name`</a> | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="vcs-provider-name" href="#vcs-provider-name">`vcs.provider.name`</a> | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="vcs-ref-base-name" href="#vcs-ref-base-name">`vcs.ref.base.name`</a> | string | The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. [1] | `my-feature-branch`; `tag-1-test` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="vcs-ref-base-revision" href="#vcs-ref-base-revision">`vcs.ref.base.revision`</a> | string | The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. [2] | `9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc`; `main`; `123`; `HEAD` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="vcs-ref-base-type" href="#vcs-ref-base-type">`vcs.ref.base.type`</a> | string | The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. [3] | `branch`; `tag` | ![Development](https://img.shields.io/badge/-development-blue) |
@ -96,6 +98,18 @@ the `.git` extension.
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`vcs.ref.base.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 |

View File

@ -323,7 +323,9 @@ This metric is [recommended][MetricRecommended].
|---|---|---|---|---|---|
| [`vcs.change.state`](/docs/attributes-registry/vcs.md) | string | The state of the change (pull request/merge request/changelist). | `open`; `closed`; `merged` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | string | The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [1] | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.owner.name`](/docs/attributes-registry/vcs.md) | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.name`](/docs/attributes-registry/vcs.md) | string | The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [2] | `semantic-conventions`; `my-cool-repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.provider.name`](/docs/attributes-registry/vcs.md) | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `vcs.repository.url.full`:** In Git Version Control Systems, the canonical URL SHOULD NOT include
the `.git` extension.
@ -343,6 +345,18 @@ the same backends.
| `open` | Open means the change is currently active and under review. It hasn't been merged into the target branch yet, and it's still possible to make changes or add comments. | ![Development](https://img.shields.io/badge/-development-blue) |
| `wip` | WIP (work-in-progress, draft) means the change is still in progress and not yet ready for a full review. It might still undergo significant changes. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
@ -368,7 +382,9 @@ This metric is [recommended][MetricRecommended].
| [`vcs.change.state`](/docs/attributes-registry/vcs.md) | string | The state of the change (pull request/merge request/changelist). | `open`; `closed`; `merged` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.ref.head.name`](/docs/attributes-registry/vcs.md) | string | The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. [1] | `my-feature-branch`; `tag-1-test` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | string | The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [2] | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.owner.name`](/docs/attributes-registry/vcs.md) | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.name`](/docs/attributes-registry/vcs.md) | string | The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [3] | `semantic-conventions`; `my-cool-repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.provider.name`](/docs/attributes-registry/vcs.md) | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `vcs.ref.head.name`:** `head` refers to where you are right now; the current reference at a
given time.
@ -391,6 +407,18 @@ the same backends.
| `open` | Open means the change is currently active and under review. It hasn't been merged into the target branch yet, and it's still possible to make changes or add comments. | ![Development](https://img.shields.io/badge/-development-blue) |
| `wip` | WIP (work-in-progress, draft) means the change is still in progress and not yet ready for a full review. It might still undergo significant changes. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
@ -415,8 +443,10 @@ This metric is [recommended][MetricRecommended].
|---|---|---|---|---|---|
| [`vcs.ref.head.name`](/docs/attributes-registry/vcs.md) | string | The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. [1] | `my-feature-branch`; `tag-1-test` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | string | The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [2] | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.owner.name`](/docs/attributes-registry/vcs.md) | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.ref.base.name`](/docs/attributes-registry/vcs.md) | string | The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. [3] | `my-feature-branch`; `tag-1-test` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.name`](/docs/attributes-registry/vcs.md) | string | The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [4] | `semantic-conventions`; `my-cool-repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.provider.name`](/docs/attributes-registry/vcs.md) | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.ref.base.revision`](/docs/attributes-registry/vcs.md) | string | The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. [5] | `9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc`; `main`; `123`; `HEAD` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.ref.head.revision`](/docs/attributes-registry/vcs.md) | string | The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. [6] | `9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc`; `main`; `123`; `HEAD` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
@ -460,6 +490,18 @@ it is identical to the `ref.head.name`, it SHOULD still be included.
It is up to the implementer to decide which value to set as the
revision based on the VCS system and situational context.
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
@ -484,8 +526,10 @@ This metric is [recommended][MetricRecommended].
|---|---|---|---|---|---|
| [`vcs.ref.head.name`](/docs/attributes-registry/vcs.md) | string | The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. [1] | `my-feature-branch`; `tag-1-test` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | string | The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [2] | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.owner.name`](/docs/attributes-registry/vcs.md) | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.ref.base.name`](/docs/attributes-registry/vcs.md) | string | The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. [3] | `my-feature-branch`; `tag-1-test` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.name`](/docs/attributes-registry/vcs.md) | string | The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [4] | `semantic-conventions`; `my-cool-repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.provider.name`](/docs/attributes-registry/vcs.md) | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.ref.base.revision`](/docs/attributes-registry/vcs.md) | string | The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. [5] | `9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc`; `main`; `123`; `HEAD` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.ref.head.revision`](/docs/attributes-registry/vcs.md) | string | The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN. [6] | `9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc`; `main`; `123`; `HEAD` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
@ -529,6 +573,18 @@ it is identical to the `ref.head.name`, it SHOULD still be included.
It is up to the implementer to decide which value to set as the
revision based on the VCS system and situational context.
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
@ -549,6 +605,23 @@ This metric is [recommended][MetricRecommended].
| -------- | --------------- | ----------- | -------------- | --------- |
| `vcs.repository.count` | UpDownCounter | `{repository}` | The number of repositories in an organization. | ![Development](https://img.shields.io/badge/-development-blue) |
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`vcs.owner.name`](/docs/attributes-registry/vcs.md) | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.provider.name`](/docs/attributes-registry/vcs.md) | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
@ -573,7 +646,9 @@ This metric is [recommended][MetricRecommended].
|---|---|---|---|---|---|
| [`vcs.ref.type`](/docs/attributes-registry/vcs.md) | string | The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. | `branch`; `tag` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | string | The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [1] | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.owner.name`](/docs/attributes-registry/vcs.md) | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.name`](/docs/attributes-registry/vcs.md) | string | The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [2] | `semantic-conventions`; `my-cool-repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.provider.name`](/docs/attributes-registry/vcs.md) | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `vcs.repository.url.full`:** In Git Version Control Systems, the canonical URL SHOULD NOT include
the `.git` extension.
@ -584,6 +659,18 @@ the same backends.
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`vcs.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 |
@ -624,7 +711,9 @@ If number of lines added/removed should be calculated from the start of time, th
| [`vcs.ref.head.type`](/docs/attributes-registry/vcs.md) | string | The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. [4] | `branch`; `tag` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | string | The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [5] | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.change.id`](/docs/attributes-registry/vcs.md) | string | The ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. | `123` | `Conditionally Required` if a change is associate with the ref. | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.owner.name`](/docs/attributes-registry/vcs.md) | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.name`](/docs/attributes-registry/vcs.md) | string | The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [6] | `semantic-conventions`; `my-cool-repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.provider.name`](/docs/attributes-registry/vcs.md) | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `vcs.ref.base.name`:** `base` refers to the starting point of a change. For example, `main`
would be the base reference of type branch if you've created a new
@ -658,6 +747,18 @@ the same backends.
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`vcs.ref.base.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 |
@ -706,7 +807,9 @@ instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers)
| [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | string | The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [5] | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.revision_delta.direction`](/docs/attributes-registry/vcs.md) | string | The type of revision comparison. | `ahead`; `behind` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.change.id`](/docs/attributes-registry/vcs.md) | string | The ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. | `123` | `Conditionally Required` if a change is associate with the ref. | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.owner.name`](/docs/attributes-registry/vcs.md) | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.name`](/docs/attributes-registry/vcs.md) | string | The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [6] | `semantic-conventions`; `my-cool-repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.provider.name`](/docs/attributes-registry/vcs.md) | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `vcs.ref.base.name`:** `base` refers to the starting point of a change. For example, `main`
would be the base reference of type branch if you've created a new
@ -731,6 +834,18 @@ the same backends.
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`vcs.ref.base.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 |
@ -781,7 +896,9 @@ This metric is [recommended][MetricRecommended].
| [`vcs.ref.head.name`](/docs/attributes-registry/vcs.md) | string | The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. [1] | `my-feature-branch`; `tag-1-test` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.ref.head.type`](/docs/attributes-registry/vcs.md) | string | The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. [2] | `branch`; `tag` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | string | The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [3] | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.owner.name`](/docs/attributes-registry/vcs.md) | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.name`](/docs/attributes-registry/vcs.md) | string | The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [4] | `semantic-conventions`; `my-cool-repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.provider.name`](/docs/attributes-registry/vcs.md) | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `vcs.ref.head.name`:** `head` refers to where you are right now; the current reference at a
given time.
@ -798,6 +915,18 @@ the same backends.
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`vcs.ref.head.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 |
@ -828,7 +957,9 @@ This metric is [opt-in][MetricOptIn].
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | string | The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [1] | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.owner.name`](/docs/attributes-registry/vcs.md) | string | The group owner within the version control system. | `my-org`; `myteam`; `business-unit` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.name`](/docs/attributes-registry/vcs.md) | string | The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [2] | `semantic-conventions`; `my-cool-repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.provider.name`](/docs/attributes-registry/vcs.md) | string | The name of the version control system provider. | `github`; `gitlab`; `gittea`; `bitbucket` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `vcs.repository.url.full`:** In Git Version Control Systems, the canonical URL SHOULD NOT include
the `.git` extension.
@ -837,6 +968,18 @@ the `.git` extension.
repository if collecting telemetry across multiple orgs or groups in
the same backends.
---
`vcs.provider.name` 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 |
|---|---|---|
| `bitbucket` | [Bitbucket](https://bitbucket.org) | ![Development](https://img.shields.io/badge/-development-blue) |
| `github` | [GitHub](https://github.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gitlab` | [GitLab](https://gitlab.com) | ![Development](https://img.shields.io/badge/-development-blue) |
| `gittea` | [Gitea](https://gitea.io) | ![Development](https://img.shields.io/badge/-development-blue) |
| `other_provider` | Some other version control system provider. Fallback only. | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->

View File

@ -13,6 +13,10 @@ groups:
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended
- ref: vcs.owner.name
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
- id: metric.vcs.change.duration
type: metric
metric_name: vcs.change.duration
@ -29,6 +33,10 @@ groups:
requirement_level: required
- ref: vcs.change.state
requirement_level: required
- ref: vcs.owner.name
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
- id: metric.vcs.change.time_to_approval
type: metric
metric_name: vcs.change.time_to_approval
@ -49,6 +57,10 @@ groups:
requirement_level: recommended
- ref: vcs.ref.base.revision
requirement_level: opt_in
- ref: vcs.owner.name
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
- id: metric.vcs.change.time_to_merge
type: metric
metric_name: vcs.change.time_to_merge
@ -69,6 +81,10 @@ groups:
requirement_level: recommended
- ref: vcs.ref.base.revision
requirement_level: opt_in
- ref: vcs.owner.name
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
- id: metric.vcs.repository.count
type: metric
metric_name: vcs.repository.count
@ -76,7 +92,11 @@ groups:
instrument: updowncounter
unit: "{repository}"
stability: development
attributes: []
attributes:
- ref: vcs.owner.name
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
- id: metric.vcs.ref.count
type: metric
metric_name: vcs.ref.count
@ -91,6 +111,10 @@ groups:
requirement_level: recommended
- ref: vcs.ref.type
requirement_level: required
- ref: vcs.owner.name
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
- id: metric.vcs.ref.lines_delta
type: metric
metric_name: vcs.ref.lines_delta
@ -120,6 +144,10 @@ groups:
requirement_level: required
- ref: vcs.line_change.type
requirement_level: required
- ref: vcs.owner.name
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
- id: metric.vcs.ref.revisions_delta
type: metric
metric_name: vcs.ref.revisions_delta
@ -148,6 +176,10 @@ groups:
requirement_level: required
- ref: vcs.revision_delta.direction
requirement_level: required
- ref: vcs.owner.name
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
- id: metric.vcs.ref.time
type: metric
metric_name: vcs.ref.time
@ -164,6 +196,10 @@ groups:
requirement_level: required
- ref: vcs.ref.head.type
requirement_level: required
- ref: vcs.owner.name
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
- id: metric.vcs.contributor.count
type: metric
metric_name: vcs.contributor.count
@ -176,3 +212,7 @@ groups:
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended
- ref: vcs.owner.name
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in

View File

@ -239,3 +239,47 @@ groups:
brief: >
The state of the change (pull request/merge request/changelist).
examples: ["open", "closed", "merged"]
- id: vcs.owner.name
type: string
stability: development
brief: >
The group owner within the version control system.
examples:
[
"my-org",
"myteam",
"business-unit",
]
- id: vcs.provider.name
type:
members:
- id: other_provider
value: other_provider
brief: "Some other version control system provider. Fallback only."
stability: development
- id: github
value: github
brief: "[GitHub](https://github.com)"
stability: development
- id: gitlab
value: gitlab
brief: "[GitLab](https://gitlab.com)"
stability: development
- id: gittea
value: gittea
brief: "[Gitea](https://gitea.io)"
stability: development
- id: bitbucket
value: bitbucket
brief: "[Bitbucket](https://bitbucket.org)"
stability: development
stability: development
brief: >
The name of the version control system provider.
examples:
[
"github",
"gitlab",
"gittea",
"bitbucket",
]