From cfffb4f8cd4f40023255624e6a4ce56dcfcb0d74 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 3 Oct 2024 22:22:51 +0200 Subject: [PATCH] [cicd] rename vcs.repository.ref.* to vcs.ref.* --- docs/attributes-registry/vcs.md | 20 ++++---- docs/cicd/cicd-metrics.md | 86 ++++++++++++++++----------------- model/vcs/metrics.yaml | 50 +++++++++---------- model/vcs/registry.yaml | 6 +-- 4 files changed, 81 insertions(+), 81 deletions(-) diff --git a/docs/attributes-registry/vcs.md b/docs/attributes-registry/vcs.md index 843ec94770..712d6f920d 100644 --- a/docs/attributes-registry/vcs.md +++ b/docs/attributes-registry/vcs.md @@ -10,15 +10,15 @@ This group defines the attributes for [Version Control Systems (VCS)](https://en.wikipedia.org/wiki/Version_control). -| 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.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 @@ -39,7 +39,7 @@ based on the VCS system and situational context. | `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.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. +`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 | | -------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 62c7376c6d..d12349ed56 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -15,12 +15,12 @@ linkTitle: CICD metrics - [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) - - [Metric: `vcs.repository.ref.lines_deleted`](#metric-vcsrepositoryreflines_deleted) - - [Metric: `vcs.repository.ref.revisions_ahead`](#metric-vcsrepositoryrefrevisions_ahead) - - [Metric: `vcs.repository.ref.revisions_behind`](#metric-vcsrepositoryrefrevisions_behind) - - [Metric: `vcs.repository.ref.time`](#metric-vcsrepositoryreftime) + - [Metric: `vcs.ref.count`](#metric-vcsrefcount) + - [Metric: `vcs.ref.lines_added`](#metric-vcsreflines_added) + - [Metric: `vcs.ref.lines_deleted`](#metric-vcsreflines_deleted) + - [Metric: `vcs.ref.revisions_ahead`](#metric-vcsrefrevisions_ahead) + - [Metric: `vcs.ref.revisions_behind`](#metric-vcsrefrevisions_behind) + - [Metric: `vcs.ref.time`](#metric-vcsreftime) - [Metric: `vcs.repository.contributor.count`](#metric-vcsrepositorycontributorcount) @@ -86,7 +86,7 @@ This metric is [recommended][MetricRecommended]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`vcs.change.state`](/docs/attributes-registry/vcs.md) | string | The state of the change (pull request/merge request/changelist). | `open`; `closed`; `merged` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`vcs.repository.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`vcs.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | `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. @@ -122,7 +122,7 @@ This metric is [recommended][MetricRecommended]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`vcs.repository.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`vcs.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -152,11 +152,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `vcs.repository.ref.count` +### Metric: `vcs.ref.count` This metric is [recommended][MetricRecommended]. - + @@ -165,14 +165,14 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `vcs.repository.ref.count` | UpDownCounter | `{ref}` | The number of refs of type branch or tag in a repository | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vcs.ref.count` | UpDownCounter | `{ref}` | The number of refs of type branch or tag in a repository | ![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 | |---|---|---|---|---|---| -| [`vcs.repository.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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`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. +`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 | |---|---|---| @@ -186,11 +186,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `vcs.repository.ref.lines_added` +### Metric: `vcs.ref.lines_added` This metric is [recommended][MetricRecommended]. - + @@ -199,15 +199,15 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `vcs.repository.ref.lines_added` | Gauge | `{line}` | The number of lines added in a ref (branch) relative to the default branch (trunk) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vcs.ref.lines_added` | Gauge | `{line}` | The number of lines added in a ref (branch) relative to the default branch (trunk) | ![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 | |---|---|---|---|---|---| -| [`vcs.repository.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`vcs.repository.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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`vcs.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`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. +`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 | |---|---|---| @@ -221,11 +221,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `vcs.repository.ref.lines_deleted` +### Metric: `vcs.ref.lines_deleted` This metric is [recommended][MetricRecommended]. - + @@ -234,15 +234,15 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `vcs.repository.ref.lines_deleted` | Gauge | `{line}` | The number of lines deleted in a ref (branch) relative to the default branch (trunk) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vcs.ref.lines_deleted` | Gauge | `{line}` | The number of lines deleted in a ref (branch) relative to the default branch (trunk) | ![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 | |---|---|---|---|---|---| -| [`vcs.repository.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`vcs.repository.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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`vcs.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`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. +`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 | |---|---|---| @@ -256,11 +256,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `vcs.repository.ref.revisions_ahead` +### Metric: `vcs.ref.revisions_ahead` This metric is [recommended][MetricRecommended]. - + @@ -269,15 +269,15 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `vcs.repository.ref.revisions_ahead` | Gauge | `{revision}` | The number of revisions (commits) a ref (branch) is ahead of the default branch (trunk) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vcs.ref.revisions_ahead` | Gauge | `{revision}` | The number of revisions (commits) a ref (branch) is ahead of the default branch (trunk) | ![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 | |---|---|---|---|---|---| -| [`vcs.repository.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`vcs.repository.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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`vcs.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`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. +`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 | |---|---|---| @@ -291,11 +291,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `vcs.repository.ref.revisions_behind` +### Metric: `vcs.ref.revisions_behind` This metric is [recommended][MetricRecommended]. - + @@ -304,15 +304,15 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `vcs.repository.ref.revisions_behind` | Gauge | `{revision}` | The number of revisions (commits) a ref (branch) is behind the default branch (trunk) | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vcs.ref.revisions_behind` | Gauge | `{revision}` | The number of revisions (commits) a ref (branch) is behind the default branch (trunk) | ![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 | |---|---|---|---|---|---| -| [`vcs.repository.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`vcs.repository.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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`vcs.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`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. +`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 | |---|---|---| @@ -326,11 +326,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `vcs.repository.ref.time` +### Metric: `vcs.ref.time` This metric is [recommended][MetricRecommended]. - + @@ -339,15 +339,15 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `vcs.repository.ref.time` | Gauge | `s` | Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vcs.ref.time` | Gauge | `s` | Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch` | ![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 | |---|---|---|---|---|---| -| [`vcs.repository.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`vcs.repository.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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`vcs.ref.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. | `my-feature-branch`; `tag-1-test` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`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. +`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 | |---|---|---| diff --git a/model/vcs/metrics.yaml b/model/vcs/metrics.yaml index 57bb63f57a..ec8b466720 100644 --- a/model/vcs/metrics.yaml +++ b/model/vcs/metrics.yaml @@ -21,7 +21,7 @@ groups: attributes: - ref: vcs.repository.url.full requirement_level: required - - ref: vcs.repository.ref.name + - ref: vcs.ref.name requirement_level: required - ref: vcs.change.state requirement_level: required @@ -35,7 +35,7 @@ groups: attributes: - ref: vcs.repository.url.full requirement_level: required - - ref: vcs.repository.ref.name + - ref: vcs.ref.name requirement_level: required - id: metric.vcs.repository.count type: metric @@ -45,9 +45,9 @@ groups: unit: "{repository}" stability: experimental attributes: [] - - id: metric.vcs.repository.ref.count + - id: metric.vcs.ref.count type: metric - metric_name: vcs.repository.ref.count + metric_name: vcs.ref.count brief: 'The number of refs of type branch or tag in a repository' instrument: updowncounter unit: "{ref}" @@ -55,11 +55,11 @@ groups: attributes: - ref: vcs.repository.url.full requirement_level: required - - ref: vcs.repository.ref.type + - ref: vcs.ref.type requirement_level: required - - id: metric.vcs.repository.ref.lines_added + - id: metric.vcs.ref.lines_added type: metric - metric_name: vcs.repository.ref.lines_added + metric_name: vcs.ref.lines_added brief: 'The number of lines added in a ref (branch) relative to the default branch (trunk)' instrument: gauge unit: "{line}" @@ -67,13 +67,13 @@ groups: attributes: - ref: vcs.repository.url.full requirement_level: required - - ref: vcs.repository.ref.name + - ref: vcs.ref.name requirement_level: required - - ref: vcs.repository.ref.type + - ref: vcs.ref.type requirement_level: required - - id: metric.vcs.repository.ref.lines_deleted + - id: metric.vcs.ref.lines_deleted type: metric - metric_name: vcs.repository.ref.lines_deleted + metric_name: vcs.ref.lines_deleted brief: 'The number of lines deleted in a ref (branch) relative to the default branch (trunk)' instrument: gauge unit: "{line}" @@ -81,13 +81,13 @@ groups: attributes: - ref: vcs.repository.url.full requirement_level: required - - ref: vcs.repository.ref.name + - ref: vcs.ref.name requirement_level: required - - ref: vcs.repository.ref.type + - ref: vcs.ref.type requirement_level: required - - id: metric.vcs.repository.ref.revisions_ahead + - id: metric.vcs.ref.revisions_ahead type: metric - metric_name: vcs.repository.ref.revisions_ahead + metric_name: vcs.ref.revisions_ahead brief: 'The number of revisions (commits) a ref (branch) is ahead of the default branch (trunk)' instrument: gauge unit: "{revision}" @@ -95,13 +95,13 @@ groups: attributes: - ref: vcs.repository.url.full requirement_level: required - - ref: vcs.repository.ref.name + - ref: vcs.ref.name requirement_level: required - - ref: vcs.repository.ref.type + - ref: vcs.ref.type requirement_level: required - - id: metric.vcs.repository.ref.revisions_behind + - id: metric.vcs.ref.revisions_behind type: metric - metric_name: vcs.repository.ref.revisions_behind + metric_name: vcs.ref.revisions_behind brief: 'The number of revisions (commits) a ref (branch) is behind the default branch (trunk)' instrument: gauge unit: "{revision}" @@ -109,13 +109,13 @@ groups: attributes: - ref: vcs.repository.url.full requirement_level: required - - ref: vcs.repository.ref.name + - ref: vcs.ref.name requirement_level: required - - ref: vcs.repository.ref.type + - ref: vcs.ref.type requirement_level: required - - id: metric.vcs.repository.ref.time + - id: metric.vcs.ref.time type: metric - metric_name: vcs.repository.ref.time + metric_name: vcs.ref.time brief: 'Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch`' instrument: gauge unit: "s" @@ -123,9 +123,9 @@ groups: attributes: - ref: vcs.repository.url.full requirement_level: required - - ref: vcs.repository.ref.name + - ref: vcs.ref.name requirement_level: required - - ref: vcs.repository.ref.type + - ref: vcs.ref.type requirement_level: required - id: metric.vcs.repository.contributor.count type: metric diff --git a/model/vcs/registry.yaml b/model/vcs/registry.yaml index a871eff83a..90ec45dc0e 100644 --- a/model/vcs/registry.yaml +++ b/model/vcs/registry.yaml @@ -17,7 +17,7 @@ groups: "https://github.com/opentelemetry/open-telemetry-collector-contrib", "https://gitlab.com/my-org/my-project/my-projects-project/repo", ] - - id: vcs.repository.ref.name + - id: vcs.ref.name type: string stability: experimental brief: > @@ -25,7 +25,7 @@ groups: [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository. examples: ["my-feature-branch", "tag-1-test"] - - id: vcs.repository.ref.type + - id: vcs.ref.type type: members: - id: branch @@ -40,7 +40,7 @@ groups: brief: > The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository. examples: ["branch", "tag"] - - id: vcs.repository.ref.revision + - id: vcs.ref.revision type: string stability: experimental brief: >