VCS

VCS Repository Attributes

This group defines the attributes for Version Control Systems (VCS).

Attributes:

KeyStabilityValue TypeDescriptionExample Values
vcs.change.idDevelopmentstringThe 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
vcs.change.stateDevelopmentstringThe state of the change (pull request/merge request/changelist).open; closed; merged
vcs.change.titleDevelopmentstringThe 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
vcs.line_change.typeDevelopmentstringThe type of line change being measured on a branch or change.added; removed
vcs.owner.nameDevelopmentstringThe group owner within the version control system.my-org; myteam; business-unit
vcs.provider.nameDevelopmentstringThe name of the version control system provider.github; gitlab; gitea; bitbucket
vcs.ref.base.nameDevelopmentstringThe name of the reference such as branch or tag in the repository. [1]my-feature-branch; tag-1-test
vcs.ref.base.revisionDevelopmentstringThe revision, literally revised version, The revision most often refers to a commit object in Git, or a revision number in SVN. [2]9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc; main; 123; HEAD
vcs.ref.base.typeDevelopmentstringThe type of the reference in the repository. [3]branch; tag
vcs.ref.head.nameDevelopmentstringThe name of the reference such as branch or tag in the repository. [4]my-feature-branch; tag-1-test
vcs.ref.head.revisionDevelopmentstringThe revision, literally revised version, The revision most often refers to a commit object in Git, or a revision number in SVN. [5]9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc; main; 123; HEAD
vcs.ref.head.typeDevelopmentstringThe type of the reference in the repository. [6]branch; tag
vcs.ref.typeDevelopmentstringThe type of the reference in the repository.branch; tag
vcs.repository.nameDevelopmentstringThe human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [7]semantic-conventions; my-cool-repo
vcs.repository.url.fullDevelopmentstringThe canonical URL of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [8]https://github.com/opentelemetry/open-telemetry-collector-contrib; https://gitlab.com/my-org/my-project/my-projects-project/repo
vcs.revision_delta.directionDevelopmentstringThe type of revision comparison.ahead; behind

[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 reference of type branch from it and created new commits.

[2] vcs.ref.base.revision: 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 reference of type branch from it and created new commits. The revision can be a full hash value (see glossary), of the recorded change to a ref within a repository pointing to a commit commit object. It does not necessarily have to be a hash; it can simply define a revision number which is an integer that is monotonically increasing. In cases where it is identical to the ref.base.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.

[3] vcs.ref.base.type: 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 reference of type branch from it and created new commits.

[4] vcs.ref.head.name: head refers to where you are right now; the current reference at a given time.

[5] vcs.ref.head.revision: head refers to where you are right now; the current reference at a given time.The revision can be a full hash value (see glossary), of the recorded change to a ref within a repository pointing to a commit commit object. It does not necessarily have to be a hash; it can simply define a revision number which is an integer that is monotonically increasing. In cases where 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.

[6] vcs.ref.head.type: head refers to where you are right now; the current reference at a given time.

[7] vcs.repository.name: Due to it only being the name, it can clash with forks of the same repository if collecting telemetry across multiple orgs or groups in the same backends.

[8] vcs.repository.url.full: In Git Version Control Systems, the canonical URL SHOULD NOT include the .git extension.


vcs.change.state 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.

ValueDescriptionStability
closedClosed means the merge request has been closed without merging. This can happen for various reasons, such as the changes being deemed unnecessary, the issue being resolved in another way, or the author deciding to withdraw the request.Development
mergedMerged indicates that the change has been successfully integrated into the target codebase.Development
openOpen 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
wipWIP (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

vcs.line_change.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.

ValueDescriptionStability
addedHow many lines were added.Development
removedHow many lines were removed.Development

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.

ValueDescriptionStability
bitbucketBitbucketDevelopment
giteaGiteaDevelopment
githubGitHubDevelopment
gitlabGitLabDevelopment

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.

ValueDescriptionStability
branchbranchDevelopment
tagtagDevelopment

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.

ValueDescriptionStability
branchbranchDevelopment
tagtagDevelopment

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.

ValueDescriptionStability
branchbranchDevelopment
tagtagDevelopment

vcs.revision_delta.direction 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.

ValueDescriptionStability
aheadHow many revisions the change is ahead of the target ref.Development
behindHow many revisions the change is behind the target ref.Development

VCS Deprecated Attributes

Describes deprecated vcs attributes.

Attributes:

KeyStabilityValue TypeDescriptionExample Values
vcs.repository.change.idDeprecated
Replaced by vcs.change.id.
stringDeprecated, use vcs.change.id instead.123
vcs.repository.change.titleDeprecated
Replaced by vcs.change.title.
stringDeprecated, use vcs.change.title instead.Fixes broken thing; feat: add my new feature; [chore] update dependency
vcs.repository.ref.nameDeprecated
Replaced by vcs.ref.head.name.
stringDeprecated, use vcs.ref.head.name instead.my-feature-branch; tag-1-test
vcs.repository.ref.revisionDeprecated
Replaced by vcs.ref.head.revision.
stringDeprecated, use vcs.ref.head.revision instead.9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc; main; 123; HEAD
vcs.repository.ref.typeDeprecated
Replaced by vcs.ref.head.type.
stringDeprecated, use vcs.ref.head.type instead.branch; tag

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.

ValueDescriptionStability
branchbranchDevelopment
tagtagDevelopment