Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VCS metrics from Github receiver #1383

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
44a1c81
[cicd] add first cicd metric to registry, created cicd-metrics doc
christophe-kamphaus-jemmic Sep 2, 2024
700412a
[cicd] link to cicd doc from parent readme
christophe-kamphaus-jemmic Sep 2, 2024
4d8e3a9
[cicd] fix typo vsc -> vcs
christophe-kamphaus-jemmic Sep 3, 2024
9bd4a95
[cicd] fix toc
christophe-kamphaus-jemmic Sep 3, 2024
592483f
[cicd] use {change} as metric unit
christophe-kamphaus-jemmic Sep 3, 2024
238c764
[cicd] formatting and rename metrics section
christophe-kamphaus-jemmic Sep 3, 2024
ef91dfa
[cicd] add remaining metrics from githubreceiver
christophe-kamphaus-jemmic Sep 3, 2024
f712312
[cicd] fix markdown code quotation
christophe-kamphaus-jemmic Sep 3, 2024
8c2e8a7
[cicd] add changelog entry
christophe-kamphaus-jemmic Sep 3, 2024
a148a4e
[cicd] add closed state to vcs.change.state
christophe-kamphaus-jemmic Sep 6, 2024
347b15b
[cicd] improved brief for vcs.change.state
christophe-kamphaus-jemmic Sep 6, 2024
afaa1f5
[cicd] update vcs.change.state briefs
christophe-kamphaus-jemmic Sep 15, 2024
5a9ffe7
[cicd] combine vcs.change.time_* metrics into one histogram metric
christophe-kamphaus-jemmic Sep 15, 2024
2da96a5
[cicd] update vcs.repository.ref.count brief to follow vcs.repository…
christophe-kamphaus-jemmic Sep 15, 2024
c232041
[cicd] fix metric and table mismatch
christophe-kamphaus-jemmic Sep 15, 2024
aab9f90
[cicd] change instrument from gauge to updowncounter
christophe-kamphaus-jemmic Sep 15, 2024
41543cd
[cicd] replace vcs.repository.name with vcs.repository.url.full in ci…
christophe-kamphaus-jemmic Sep 15, 2024
7f35251
Merge branch 'main' into 1372-vcs-metrics
christophe-kamphaus-jemmic Sep 17, 2024
a5eff73
[cicd] apply changes from #1411 to docs/cicd/cicd-metrics.md
christophe-kamphaus-jemmic Sep 17, 2024
7107911
[cicd] fix yamllint
christophe-kamphaus-jemmic Sep 17, 2024
15fe1fb
Merge branch 'main' into 1372-vcs-metrics
christophe-kamphaus-jemmic Oct 2, 2024
30c8fdb
Merge branch 'main' into 1372-vcs-metrics
christophe-kamphaus-jemmic Oct 3, 2024
344eeed
[cicd] Add /docs/cicd/ to CODEOWNERS
christophe-kamphaus-jemmic Oct 3, 2024
cfcdaf1
[cicd] rename metric and improve description
christophe-kamphaus-jemmic Oct 3, 2024
e174ef3
[cicd] add (PR/MR) to all vcs metric briefs relating to changes
christophe-kamphaus-jemmic Oct 3, 2024
7d114d3
[cicd] rephrase examples in brief to be inclusive
christophe-kamphaus-jemmic Oct 3, 2024
b92cc08
[cicd] make repository count an updowncounter
christophe-kamphaus-jemmic Oct 3, 2024
84b2b6a
[cicd] add metric requirement levels
christophe-kamphaus-jemmic Oct 3, 2024
163e498
[cicd] add wip state to vcs.change.state
christophe-kamphaus-jemmic Oct 3, 2024
d2ce62f
[cicd] add changelist to briefs for change
christophe-kamphaus-jemmic Oct 3, 2024
536a2a7
[cicd] rename vcs.repository.change.* to vcs.change.*
christophe-kamphaus-jemmic Oct 3, 2024
cfffb4f
[cicd] rename vcs.repository.ref.* to vcs.ref.*
christophe-kamphaus-jemmic Oct 3, 2024
0e02a47
[cicd] follow procedure for renaming attributes
christophe-kamphaus-jemmic Oct 3, 2024
1a89934
Merge branch 'main' into 1372-vcs-metrics
christophe-kamphaus-jemmic Oct 10, 2024
b5c4660
[cicd] change instrument type from "gauge histogram" back to gauge
christophe-kamphaus-jemmic Oct 10, 2024
dafdad7
[cicd] combine lines added/removed and revisions ahead/behind metrics
christophe-kamphaus-jemmic Oct 10, 2024
3e122e8
[cicd] fix minor brief issues
christophe-kamphaus-jemmic Oct 10, 2024
513ae8b
Merge branch 'main' into 1372-vcs-metrics
christophe-kamphaus-jemmic Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .chloggen/1372-vcs-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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: breaking

# 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 the VCS metrics from the GitHub Receiver

# 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: [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: |
- 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.*`.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
/model/user/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-security-approvers

# CICD semantic conventions
/docs/cicd/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers
/model/artifact/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers
/model/cicd/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers
/model/code/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-cicd-approvers
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The benefit to using Semantic Conventions is in following a common naming scheme
Semantic Conventions are defined for the following areas:

* **[General](general/README.md): General Semantic Conventions**.
* [CICD](cicd/cicd-metrics.md): Semantic Conventions for CICD systems.
christophe-kamphaus-jemmic marked this conversation as resolved.
Show resolved Hide resolved
christophe-kamphaus-jemmic marked this conversation as resolved.
Show resolved Hide resolved
* [Cloud Providers](cloud-providers/README.md): Semantic Conventions for cloud providers libraries.
* [CloudEvents](cloudevents/README.md): Semantic Conventions for the CloudEvents specification.
* [Database](database/README.md): Semantic Conventions for database operations.
Expand Down
48 changes: 40 additions & 8 deletions docs/attributes-registry/vcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@

# 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).

| Attribute | Type | Description | Examples | Stability |
| ----------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| `vcs.repository.change.id` | string | The ID of the change (pull request/merge request) if applicable. This is usually a unique (within repository) identifier generated by the VCS system. | `123` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.repository.change.title` | string | The human readable title of the change (pull request/merge request). 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.repository.ref.name` | string | The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. | `my-feature-branch`; `tag-1-test` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.repository.ref.revision` | 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. [1] | `9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc`; `main`; `123`; `HEAD` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.repository.ref.type` | string | The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. | `branch`; `tag` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.repository.url.full` | string | The [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the complete address in order to locate and identify the repository. | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| Attribute | Type | Description | Examples | Stability |
| ------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| `vcs.change.id` | 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.change.state` | string | The state of the change (pull request/merge request/changelist). | `open`; `closed`; `merged` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.change.title` | 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.ref.name` | string | The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. | `my-feature-branch`; `tag-1-test` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.ref.revision` | 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. [1] | `9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc`; `main`; `123`; `HEAD` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.ref.type` | string | The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. | `branch`; `tag` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `vcs.repository.url.full` | string | The [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the complete address in order to locate and identify the repository. | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** The revision can be a full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf),
of the recorded change to a ref within a repository pointing to a
Expand All @@ -29,6 +33,34 @@ it is identical to the `ref.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.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.

| Value | Description | Stability |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `closed` | Closed 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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `merged` | Merged indicates that the change has been successfully integrated into the target codebase. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `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. | ![Experimental](https://img.shields.io/badge/-experimental-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. | ![Experimental](https://img.shields.io/badge/-experimental-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 |
| -------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| `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 |
Expand Down
Loading