semantic-conventions icon indicating copy to clipboard operation
semantic-conventions copied to clipboard

Proposal: version control system (VCS) information: revision

Open jschaf opened this issue 1 year ago • 2 comments

Proposal: add vcs.revision as a semantic convention key.

It's often useful to add the version control revision, like a Git commit hash, to logs and traces that indicate the commit that the binary was built from. The vcs.revision is helpful to debug production issues.

As a counterpoint, service.version might already include the information or be detailed enough to identify the commit.

Complicating matters: should there also be vcs.repo to denote which repo the commit originated from?

jschaf avatar Jun 11 '24 18:06 jschaf

related to https://github.com/open-telemetry/semantic-conventions/issues/915

trask avatar Jun 11 '24 20:06 trask

We should also discuss whether or not vcs.repository.name should be a value or whether or not we should use an URI in its stead. Currently the working pull request adds vcs.repository.url.full to denote the address of the repository. See https://github.com/open-telemetry/semantic-conventions/pull/1075/files/2ece67333789008ab997552e4683f341d9916101#r1657015107

adrielp avatar Jul 16 '24 00:07 adrielp

Relates to #1383 .

vcs.repository.ref.revision has now been moved to vcs.ref.{head,base}.revision in the above linked pull request.

vcs.repository.url.full is an attribute denoting the repository.

@jschaf - feel free to comment here on whether or not that helps/works. Happy to get feedback / discuss this further. I think the core attributes are there in the registry, but we haven't identified event/trace specifics, yet.

adrielp avatar Nov 07 '24 14:11 adrielp

Yep, works for me. Thank you for following up.

For feedback, the keys seem a touch wordy with repository, but that's pretty far into bike-shed territory.

jschaf avatar Nov 07 '24 18:11 jschaf