diff --git a/docs/attributes-registry/vcs.md b/docs/attributes-registry/vcs.md index 322f243820..843ec94770 100644 --- a/docs/attributes-registry/vcs.md +++ b/docs/attributes-registry/vcs.md @@ -12,9 +12,9 @@ This group defines the attributes for [Version Control Systems (VCS)](https://en | 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.repository.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.repository.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.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.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) | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 3d44ad5801..62c7376c6d 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -11,9 +11,9 @@ linkTitle: CICD metrics - [VCS Metrics](#vcs-metrics) - - [Metric: `vcs.repository.change.count`](#metric-vcsrepositorychangecount) - - [Metric: `vcs.repository.change.duration`](#metric-vcsrepositorychangeduration) - - [Metric: `vcs.repository.change.time_to_approval`](#metric-vcsrepositorychangetime_to_approval) + - [Metric: `vcs.change.count`](#metric-vcschangecount) + - [Metric: `vcs.change.duration`](#metric-vcschangeduration) + - [Metric: `vcs.change.time_to_approval`](#metric-vcschangetime_to_approval) - [Metric: `vcs.repository.count`](#metric-vcsrepositorycount) - [Metric: `vcs.repository.ref.count`](#metric-vcsrepositoryrefcount) - [Metric: `vcs.repository.ref.lines_added`](#metric-vcsrepositoryreflines_added) @@ -32,11 +32,11 @@ The conventions described in this section are specific to Version Control System **Disclaimer:** These are initial VCS metrics and attributes but more may be added in the future. -### Metric: `vcs.repository.change.count` +### Metric: `vcs.change.count` This metric is [recommended][MetricRecommended]. - + @@ -45,7 +45,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `vcs.repository.change.count` | UpDownCounter | `{change}` | The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vcs.change.count` | UpDownCounter | `{change}` | The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| @@ -68,11 +68,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `vcs.repository.change.duration` +### Metric: `vcs.change.duration` This metric is [recommended][MetricRecommended]. - + @@ -81,7 +81,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `vcs.repository.change.duration` | Histogram | `s` | The time duration a change (pull request/merge request/changelist) has been in a given state. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vcs.change.duration` | Histogram | `s` | The time duration a change (pull request/merge request/changelist) has been in a given state. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| @@ -105,11 +105,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `vcs.repository.change.time_to_approval` +### Metric: `vcs.change.time_to_approval` This metric is [recommended][MetricRecommended]. - + @@ -118,7 +118,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `vcs.repository.change.time_to_approval` | Histogram | `s` | The amount of time it took a change (pull request/merge request/changelist) to go from open to approved | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vcs.change.time_to_approval` | Histogram | `s` | The amount of time it took a change (pull request/merge request/changelist) to go from open to approved | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| diff --git a/model/vcs/metrics.yaml b/model/vcs/metrics.yaml index 978c191a45..57bb63f57a 100644 --- a/model/vcs/metrics.yaml +++ b/model/vcs/metrics.yaml @@ -1,7 +1,7 @@ groups: - - id: metric.vcs.repository.change.count + - id: metric.vcs.change.count type: metric - metric_name: vcs.repository.change.count + metric_name: vcs.change.count brief: 'The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged)' instrument: updowncounter unit: "{change}" @@ -11,9 +11,9 @@ groups: requirement_level: required - ref: vcs.repository.url.full requirement_level: required - - id: metric.vcs.repository.change.duration + - id: metric.vcs.change.duration type: metric - metric_name: vcs.repository.change.duration + metric_name: vcs.change.duration brief: 'The time duration a change (pull request/merge request/changelist) has been in a given state.' instrument: histogram unit: "s" @@ -25,9 +25,9 @@ groups: requirement_level: required - ref: vcs.change.state requirement_level: required - - id: metric.vcs.repository.change.time_to_approval + - id: metric.vcs.change.time_to_approval type: metric - metric_name: vcs.repository.change.time_to_approval + metric_name: vcs.change.time_to_approval brief: 'The amount of time it took a change (pull request/merge request/changelist) to go from open to approved' instrument: histogram unit: "s" diff --git a/model/vcs/registry.yaml b/model/vcs/registry.yaml index b6cde2ebd6..a871eff83a 100644 --- a/model/vcs/registry.yaml +++ b/model/vcs/registry.yaml @@ -63,7 +63,7 @@ groups: "123", "HEAD", ] - - id: vcs.repository.change.title + - id: vcs.change.title type: string stability: experimental brief: > @@ -76,7 +76,7 @@ groups: "feat: add my new feature", "[chore] update dependency", ] - - id: vcs.repository.change.id + - id: vcs.change.id type: string stability: experimental brief: >