Add CICD spans and resources (#2013)

Co-authored-by: Adriel Perkins <adriel@adrielperkins.com>
This commit is contained in:
Christophe Kamphaus 2025-05-02 21:27:15 +02:00 committed by GitHub
parent 2073d8ab5e
commit 899a326c3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 702 additions and 14 deletions

View File

@ -0,0 +1,26 @@
# 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: enhancement
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: cicd
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add resource conventions for CICD systems and define spans for CICD pipeline runs.
# 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: [1713]
# (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: |
Define spans `cicd.pipeline.run.server` and `cicd.pipeline.task.internal`.
Add `cicd.pipeline.action.name`, `cicd.worker.id`, `cicd.worker.name`, `cicd.worker.url.full` and`cicd.pipeline.task.run.result` to attribute registry.
Define resources `cicd.pipeline`, `cicd.pipeline.run` and `cicd.worker`.
Add entity associations in cicd metrics for these new cicd resources.

View File

@ -0,0 +1,24 @@
# 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: enhancement
# 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 resource conventions for VCS systems and VCS references.
# 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: [1713]
# (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: |
Define resources `vcs.repo` and `vcs.ref`.
Add entity associations in vcs metrics for these new vcs resources.

View File

@ -19,7 +19,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.
* [CICD](cicd/README.md): Semantic Conventions for CICD systems.
* [Code](code/README.md): Semantic Conventions for code.
* [Cloud Providers](cloud-providers/README.md): Semantic Conventions for cloud providers libraries.
* [CloudEvents](cloudevents/README.md): Semantic Conventions for the CloudEvents specification.

View File

@ -9,6 +9,7 @@ This group describes attributes specific to pipelines within a Continuous Integr
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| <a id="cicd-pipeline-action-name" href="#cicd-pipeline-action-name">`cicd.pipeline.action.name`</a> | string | The kind of action a pipeline run is performing. | `BUILD`; `RUN`; `SYNC` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-pipeline-name" href="#cicd-pipeline-name">`cicd.pipeline.name`</a> | string | The human readable name of the pipeline within a CI/CD system. | `Build and Test`; `Lint`; `Deploy Go Project`; `deploy_to_environment` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-pipeline-result" href="#cicd-pipeline-result">`cicd.pipeline.result`</a> | string | The result of a pipeline run. | `success`; `failure`; `timeout`; `skipped` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-pipeline-run-id" href="#cicd-pipeline-run-id">`cicd.pipeline.run.id`</a> | string | The unique identifier of a pipeline run within a CI/CD system. | `120912` | ![Development](https://img.shields.io/badge/-development-blue) |
@ -16,10 +17,24 @@ This group describes attributes specific to pipelines within a Continuous Integr
| <a id="cicd-pipeline-run-url-full" href="#cicd-pipeline-run-url-full">`cicd.pipeline.run.url.full`</a> | string | The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run. | `https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-pipeline-task-name" href="#cicd-pipeline-task-name">`cicd.pipeline.task.name`</a> | string | The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. | `Run GoLang Linter`; `Go Build`; `go-test`; `deploy_binary` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-pipeline-task-run-id" href="#cicd-pipeline-task-run-id">`cicd.pipeline.task.run.id`</a> | string | The unique identifier of a task run within a pipeline. | `12097` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-pipeline-task-run-result" href="#cicd-pipeline-task-run-result">`cicd.pipeline.task.run.result`</a> | string | The result of a task run. | `success`; `failure`; `timeout`; `skipped` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-pipeline-task-run-url-full" href="#cicd-pipeline-task-run-url-full">`cicd.pipeline.task.run.url.full`</a> | string | The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run. | `https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-pipeline-task-type" href="#cicd-pipeline-task-type">`cicd.pipeline.task.type`</a> | string | The type of the task within a pipeline. | `build`; `test`; `deploy` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-system-component" href="#cicd-system-component">`cicd.system.component`</a> | string | The name of a component of the CICD system. | `controller`; `scheduler`; `agent` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-worker-id" href="#cicd-worker-id">`cicd.worker.id`</a> | string | The unique identifier of a worker within a CICD system. | `abc123`; `10.0.1.2`; `controller` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-worker-name" href="#cicd-worker-name">`cicd.worker.name`</a> | string | The name of a worker within a CICD system. | `agent-abc`; `controller`; `Ubuntu LTS` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-worker-state" href="#cicd-worker-state">`cicd.worker.state`</a> | string | The state of a CICD worker / agent. | `idle`; `busy`; `down` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="cicd-worker-url-full" href="#cicd-worker-url-full">`cicd.worker.url.full`</a> | string | The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker. | `https://cicd.example.org/worker/abc123` | ![Development](https://img.shields.io/badge/-development-blue) |
---
`cicd.pipeline.action.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.
| Value | Description | Stability |
|---|---|---|
| `BUILD` | The pipeline run is executing a build. | ![Development](https://img.shields.io/badge/-development-blue) |
| `RUN` | The pipeline run is executing. | ![Development](https://img.shields.io/badge/-development-blue) |
| `SYNC` | The pipeline run is executing a sync. | ![Development](https://img.shields.io/badge/-development-blue) |
---
@ -46,6 +61,19 @@ This group describes attributes specific to pipelines within a Continuous Integr
---
`cicd.pipeline.task.run.result` 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 |
|---|---|---|
| `cancellation` | The task run was cancelled, eg. by a user manually cancelling the task run. | ![Development](https://img.shields.io/badge/-development-blue) |
| `error` | The task run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Development](https://img.shields.io/badge/-development-blue) |
| `failure` | The task run did not finish successfully, eg. due to a compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the task run. | ![Development](https://img.shields.io/badge/-development-blue) |
| `skip` | The task run was skipped, eg. due to a precondition not being met. | ![Development](https://img.shields.io/badge/-development-blue) |
| `success` | The task run finished successfully. | ![Development](https://img.shields.io/badge/-development-blue) |
| `timeout` | A timeout caused the task run to be interrupted. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`cicd.pipeline.task.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 |

16
docs/cicd/README.md Normal file
View File

@ -0,0 +1,16 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: CICD
--->
# Semantic conventions for CICD
**Status**: [Development][DocumentStatus]
This document defines semantic conventions for Continuous Integration and Continuous Deployment (CICD) spans and metrics.
Semantic conventions for CICD are defined for the following signals:
* [CICD Spans](cicd-spans.md): Semantic Conventions for CICD *spans*.
* [CICD Metrics](cicd-metrics.md): Semantic Conventions for CICD *metrics*.
[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status

View File

@ -1,5 +1,5 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: CICD
linkTitle: Metrics
--->
# Semantic conventions for CICD metrics
@ -48,7 +48,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `cicd.pipeline.run.duration` | Histogram | `s` | Duration of a pipeline run grouped by pipeline, state and result. | ![Development](https://img.shields.io/badge/-development-blue) | |
| `cicd.pipeline.run.duration` | Histogram | `s` | Duration of a pipeline run grouped by pipeline, state and result. | ![Development](https://img.shields.io/badge/-development-blue) | `cicd.pipeline` |
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
@ -128,7 +128,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `cicd.pipeline.run.active` | UpDownCounter | `{run}` | The number of pipeline runs currently active in the system by state. | ![Development](https://img.shields.io/badge/-development-blue) | |
| `cicd.pipeline.run.active` | UpDownCounter | `{run}` | The number of pipeline runs currently active in the system by state. | ![Development](https://img.shields.io/badge/-development-blue) | `cicd.pipeline` |
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
@ -199,7 +199,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `cicd.pipeline.run.errors` | Counter | `{error}` | The number of errors encountered in pipeline runs (eg. compile, test failures). [1] | ![Development](https://img.shields.io/badge/-development-blue) | |
| `cicd.pipeline.run.errors` | Counter | `{error}` | The number of errors encountered in pipeline runs (eg. compile, test failures). [1] | ![Development](https://img.shields.io/badge/-development-blue) | `cicd.pipeline` |
**[1]:** There might be errors in a pipeline run that are non fatal (eg. they are suppressed) or in a parallel stage multiple stages could have a fatal error.
This means that this error count might not be the same as the count of metric `cicd.pipeline.run.duration` with run result `failure`.
@ -317,7 +317,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `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) | ![Development](https://img.shields.io/badge/-development-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) | ![Development](https://img.shields.io/badge/-development-blue) | `vcs.repo` |
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
@ -374,7 +374,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `vcs.change.duration` | Gauge | `s` | The time duration a change (pull request/merge request/changelist) has been in a given state. | ![Development](https://img.shields.io/badge/-development-blue) | |
| `vcs.change.duration` | Gauge | `s` | The time duration a change (pull request/merge request/changelist) has been in a given state. | ![Development](https://img.shields.io/badge/-development-blue) | `vcs.repo` |
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
@ -435,7 +435,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `vcs.change.time_to_approval` | Gauge | `s` | The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval. | ![Development](https://img.shields.io/badge/-development-blue) | |
| `vcs.change.time_to_approval` | Gauge | `s` | The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval. | ![Development](https://img.shields.io/badge/-development-blue) | `vcs.repo`; `vcs.ref` |
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
@ -517,7 +517,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `vcs.change.time_to_merge` | Gauge | `s` | The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref. | ![Development](https://img.shields.io/badge/-development-blue) | |
| `vcs.change.time_to_merge` | Gauge | `s` | The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref. | ![Development](https://img.shields.io/badge/-development-blue) | `vcs.repo`; `vcs.ref` |
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
@ -635,7 +635,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `vcs.ref.count` | UpDownCounter | `{ref}` | The number of refs of type branch or tag in a repository. | ![Development](https://img.shields.io/badge/-development-blue) | |
| `vcs.ref.count` | UpDownCounter | `{ref}` | The number of refs of type branch or tag in a repository. | ![Development](https://img.shields.io/badge/-development-blue) | `vcs.repo` |
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
@ -690,7 +690,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `vcs.ref.lines_delta` | Gauge | `{line}` | The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute. [1] | ![Development](https://img.shields.io/badge/-development-blue) | |
| `vcs.ref.lines_delta` | Gauge | `{line}` | The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute. [1] | ![Development](https://img.shields.io/badge/-development-blue) | `vcs.repo` |
**[1]:** This metric should be reported for each `vcs.line_change.type` value. For example if a ref added 3 lines and removed 2 lines,
instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers).
@ -786,7 +786,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `vcs.ref.revisions_delta` | Gauge | `{revision}` | The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute [1] | ![Development](https://img.shields.io/badge/-development-blue) | |
| `vcs.ref.revisions_delta` | Gauge | `{revision}` | The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute [1] | ![Development](https://img.shields.io/badge/-development-blue) | `vcs.repo` |
**[1]:** This metric should be reported for each `vcs.revision_delta.direction` value. For example if branch `a` is 3 commits behind and 2 commits ahead of `trunk`,
instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers) and `vcs.ref.base.name` is set to `trunk`.
@ -881,7 +881,7 @@ This metric is [recommended][MetricRecommended].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `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` | ![Development](https://img.shields.io/badge/-development-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` | ![Development](https://img.shields.io/badge/-development-blue) | `vcs.repo` |
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
@ -943,7 +943,7 @@ This metric is [opt-in][MetricOptIn].
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `vcs.contributor.count` | Gauge | `{contributor}` | The number of unique contributors to a repository | ![Development](https://img.shields.io/badge/-development-blue) | |
| `vcs.contributor.count` | Gauge | `{contributor}` | The number of unique contributors to a repository | ![Development](https://img.shields.io/badge/-development-blue) | `vcs.repo` |
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|

193
docs/cicd/cicd-spans.md Normal file
View File

@ -0,0 +1,193 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Spans
--->
# Semantic conventions for CICD spans
**Status**: [Development][DocumentStatus]
<!-- toc -->
- [CICD Spans](#cicd-spans)
- [Pipeline run](#pipeline-run)
- [Pipeline task run](#pipeline-task-run)
<!-- tocstop -->
## CICD Spans
The conventions described in this section are specific to Continuous Integration / Continuous Deployment (CICD) systems.
Any resources of the [CICD and VCS resource conventions][cicdres] that apply SHOULD be used.
[cicdres]: /docs/resource/cicd.md (CICD and VCS resource conventions)
### Pipeline run
<!-- semconv span.cicd.pipeline.run.server -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->
**Status:** ![Development](https://img.shields.io/badge/-development-blue)
This span describes a CICD pipeline run.
For all pipeline runs, a span with kind `SERVER` SHOULD be created corresponding to the execution of the pipeline run.
**Span name** MUST follow the overall [guidelines for span names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.43.0/specification/trace/api.md#span).
The span name SHOULD be `{action} {pipeline}` if there is a (low-cardinality) pipeline name available.
If the pipeline name is not available or is likely to have high cardinality, then the span name SHOULD be `{action}`.
The `{action}` SHOULD be the [`cicd.pipeline.action.name`](/docs/attributes-registry/cicd.md#cicd-pipeline-action-name).
The `{pipeline}` SHOULD be the [`cicd.pipeline.name`](/docs/attributes-registry/cicd.md#cicd-pipeline-name).
**Span kind** SHOULD be `SERVER`.
**Span status** SHOULD follow the [Recording Errors](/docs/general/recording-errors.md) document.
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`cicd.pipeline.result`](/docs/attributes-registry/cicd.md) | string | The result of a pipeline run. | `success`; `failure`; `timeout`; `skipped` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` if the pipeline result is `failure` or `error` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`cicd.pipeline.action.name`](/docs/attributes-registry/cicd.md) | string | The kind of action a pipeline run is performing. | `BUILD`; `RUN`; `SYNC` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `error.type`:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality.
When `error.type` is set to a type (e.g., an exception type), its
canonical class name identifying the type within the artifact SHOULD be used.
Instrumentations SHOULD document the list of errors they report.
The cardinality of `error.type` within one instrumentation library SHOULD be low.
Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
should be prepared for `error.type` to have high cardinality at query time when no
additional filters are applied.
If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.
If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),
it's RECOMMENDED to:
- Use a domain-specific attribute
- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
---
`cicd.pipeline.action.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.
| Value | Description | Stability |
|---|---|---|
| `BUILD` | The pipeline run is executing a build. | ![Development](https://img.shields.io/badge/-development-blue) |
| `RUN` | The pipeline run is executing. | ![Development](https://img.shields.io/badge/-development-blue) |
| `SYNC` | The pipeline run is executing a sync. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`cicd.pipeline.result` 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 |
|---|---|---|
| `cancellation` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Development](https://img.shields.io/badge/-development-blue) |
| `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Development](https://img.shields.io/badge/-development-blue) |
| `failure` | The pipeline run did not finish successfully, eg. due to a compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the pipeline run. | ![Development](https://img.shields.io/badge/-development-blue) |
| `skip` | The pipeline run was skipped, eg. due to a precondition not being met. | ![Development](https://img.shields.io/badge/-development-blue) |
| `success` | The pipeline run finished successfully. | ![Development](https://img.shields.io/badge/-development-blue) |
| `timeout` | A timeout caused the pipeline run to be interrupted. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`error.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 |
|---|---|---|
| `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
### Pipeline task run
<!-- semconv span.cicd.pipeline.task.internal -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->
**Status:** ![Development](https://img.shields.io/badge/-development-blue)
This span describes task execution in a pipeline run.
**Span kind** SHOULD be `INTERNAL`.
**Span status** SHOULD follow the [Recording Errors](/docs/general/recording-errors.md) document.
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`cicd.pipeline.task.name`](/docs/attributes-registry/cicd.md) | string | The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures. | `Run GoLang Linter`; `Go Build`; `go-test`; `deploy_binary` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`cicd.pipeline.task.run.id`](/docs/attributes-registry/cicd.md) | string | The unique identifier of a task run within a pipeline. | `12097` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`cicd.pipeline.task.run.result`](/docs/attributes-registry/cicd.md) | string | The result of a task run. | `success`; `failure`; `timeout`; `skipped` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`cicd.pipeline.task.run.url.full`](/docs/attributes-registry/cicd.md) | string | The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run. | `https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` if the task result is `failure` or `error` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
**[1] `error.type`:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality.
When `error.type` is set to a type (e.g., an exception type), its
canonical class name identifying the type within the artifact SHOULD be used.
Instrumentations SHOULD document the list of errors they report.
The cardinality of `error.type` within one instrumentation library SHOULD be low.
Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
should be prepared for `error.type` to have high cardinality at query time when no
additional filters are applied.
If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.
If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),
it's RECOMMENDED to:
- Use a domain-specific attribute
- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
The following attributes can be important for making sampling decisions
and SHOULD be provided **at span creation time** (if provided at all):
* [`cicd.pipeline.task.name`](/docs/attributes-registry/cicd.md)
* [`cicd.pipeline.task.run.id`](/docs/attributes-registry/cicd.md)
* [`cicd.pipeline.task.run.url.full`](/docs/attributes-registry/cicd.md)
---
`cicd.pipeline.task.run.result` 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 |
|---|---|---|
| `cancellation` | The task run was cancelled, eg. by a user manually cancelling the task run. | ![Development](https://img.shields.io/badge/-development-blue) |
| `error` | The task run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Development](https://img.shields.io/badge/-development-blue) |
| `failure` | The task run did not finish successfully, eg. due to a compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the task run. | ![Development](https://img.shields.io/badge/-development-blue) |
| `skip` | The task run was skipped, eg. due to a precondition not being met. | ![Development](https://img.shields.io/badge/-development-blue) |
| `success` | The task run finished successfully. | ![Development](https://img.shields.io/badge/-development-blue) |
| `timeout` | A timeout caused the task run to be interrupted. | ![Development](https://img.shields.io/badge/-development-blue) |
---
`error.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 |
|---|---|---|
| `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status

View File

@ -248,6 +248,7 @@ Attributes defining a running environment (e.g. Operating System, Cloud, Data Ce
- [Operating System](./os.md)
- [Device](./device.md)
- [Cloud](./cloud.md)
- [CICD](./cicd.md)
- Deployment:
- [Deployment Environment](./deployment-environment.md)
- [Kubernetes](./k8s.md)

193
docs/resource/cicd.md Normal file
View File

@ -0,0 +1,193 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: CICD
--->
# CICD
<!-- toc -->
- [Continuous Integration and Continuous Deployment (CICD)](#continuous-integration-and-continuous-deployment-cicd)
- [CICD pipeline](#cicd-pipeline)
- [CICD pipeline run](#cicd-pipeline-run)
- [CICD worker](#cicd-worker)
- [Version Control System (VCS)](#version-control-system-vcs)
- [VCS repository](#vcs-repository)
- [VCS reference](#vcs-reference)
<!-- tocstop -->
See also:
- The [Trace semantic conventions for CICD](/docs/cicd/cicd-spans.md)
## Continuous Integration and Continuous Deployment (CICD)
### CICD pipeline
<!-- semconv resource.cicd.pipeline -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->
**Status:** ![Development](https://img.shields.io/badge/-development-blue)
**type:** `cicd.pipeline`
**Description:** A pipeline is a series of automated steps that helps software teams deliver code.
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`cicd.pipeline.name`](/docs/attributes-registry/cicd.md) | string | The human readable name of the pipeline within a CI/CD system. | `Build and Test`; `Lint`; `Deploy Go Project`; `deploy_to_environment` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
### CICD pipeline run
To efficiently set the following attributes for all spans of a pipeline run they should be defined as the following resource.
Since this resource is unique for each pipeline run, this means instantiating separate [TracerProviders](https://opentelemetry.io/docs/specs/otel/trace/api/#tracerprovider) for each pipeline run in order to be able to configure the resources of any spans emitted through that tracer.
Using the CICD pipeline run resource with metrics inherently causes high cardinality and may increase costs with some metric storage backends. Thus, using CICD pipeline run resource for metrics MUST be opt-in.
<!-- semconv resource.cicd.pipeline.run -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->
**Status:** ![Development](https://img.shields.io/badge/-development-blue)
**type:** `cicd.pipeline.run`
**Description:** A pipeline run is a singular execution of a given pipeline's tasks.
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`cicd.pipeline.run.id`](/docs/attributes-registry/cicd.md) | string | The unique identifier of a pipeline run within a CI/CD system. | `120912` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`cicd.pipeline.run.url.full`](/docs/attributes-registry/cicd.md) | string | The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run. | `https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
### CICD worker
<!-- semconv resource.cicd.worker -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->
**Status:** ![Development](https://img.shields.io/badge/-development-blue)
**type:** `cicd.worker`
**Description:** A CICD worker is a component of the CICD system that performs work (eg. running pipeline tasks or performing sync).
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`cicd.worker.id`](/docs/attributes-registry/cicd.md) | string | The unique identifier of a worker within a CICD system. | `abc123`; `10.0.1.2`; `controller` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`cicd.worker.name`](/docs/attributes-registry/cicd.md) | string | The name of a worker within a CICD system. | `agent-abc`; `controller`; `Ubuntu LTS` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`cicd.worker.url.full`](/docs/attributes-registry/cicd.md) | string | The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker. | `https://cicd.example.org/worker/abc123` | `Recommended` If available | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
## Version Control System (VCS)
### VCS repository
<!-- semconv resource.vcs.repo -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->
**Status:** ![Development](https://img.shields.io/badge/-development-blue)
**type:** `vcs.repo`
**Description:** A repository in the Version Control System.
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`vcs.repository.name`](/docs/attributes-registry/vcs.md) | string | The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub. [1] | `semantic-conventions`; `my-cool-repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.repository.url.full`](/docs/attributes-registry/vcs.md) | string | The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser. [2] | `https://github.com/opentelemetry/open-telemetry-collector-contrib`; `https://gitlab.com/my-org/my-project/my-projects-project/repo` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `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.
**[2] `vcs.repository.url.full`:** In Git Version Control Systems, the canonical URL SHOULD NOT include
the `.git` extension.
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
### VCS reference
<!-- semconv resource.vcs.ref -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->
<!-- markdownlint-capture -->
<!-- markdownlint-disable -->
**Status:** ![Development](https://img.shields.io/badge/-development-blue)
**type:** `vcs.ref`
**Description:** A reference to a specific version in the Version Control System.
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`vcs.ref.head.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. [1] | `my-feature-branch`; `tag-1-test` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
| [`vcs.ref.head.revision`](/docs/attributes-registry/vcs.md) | 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. [2] | `9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc`; `main`; `123`; `HEAD` | `Recommended` | ![Development](https://img.shields.io/badge/-development-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` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
**[1] `vcs.ref.head.name`:** `head` refers to where you are right now; the current reference at a
given time.
**[2] `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)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf),
of the recorded change to a ref within a repository pointing to a
commit [commit](https://git-scm.com/docs/git-commit) object. It does
not necessarily have to be a hash; it can simply define a [revision
number](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html)
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.
---
`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) | ![Development](https://img.shields.io/badge/-development-blue) |
| `tag` | [tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag) | ![Development](https://img.shields.io/badge/-development-blue) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

View File

@ -17,6 +17,8 @@ groups:
- ref: error.type
requirement_level:
conditionally_required: If and only if the pipeline run failed.
entity_associations:
- cicd.pipeline
- id: metric.cicd.pipeline.run.active
type: metric
metric_name: cicd.pipeline.run.active
@ -29,6 +31,8 @@ groups:
requirement_level: required
- ref: cicd.pipeline.run.state
requirement_level: required
entity_associations:
- cicd.pipeline
- id: metric.cicd.worker.count
type: metric
metric_name: cicd.worker.count
@ -54,6 +58,8 @@ groups:
requirement_level: required
- ref: error.type
requirement_level: required
entity_associations:
- cicd.pipeline
- id: metric.cicd.system.errors
type: metric
metric_name: cicd.system.errors

View File

@ -86,6 +86,40 @@ groups:
[
"https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075",
]
- id: cicd.pipeline.task.run.result
type:
members:
- id: success
value: success
brief: "The task run finished successfully."
stability: development
- id: failure
value: failure
brief: >-
The task run did not finish successfully, eg. due to a compile error or a failing test.
Such failures are usually detected by non-zero exit codes of the tools executed in the task run.
stability: development
- id: error
value: error
brief: >-
The task run failed due to an error in the CICD system, eg. due to the worker being killed.
stability: development
- id: timeout
value: timeout
brief: "A timeout caused the task run to be interrupted."
stability: development
- id: cancellation
value: cancellation
brief: "The task run was cancelled, eg. by a user manually cancelling the task run."
stability: development
- id: skip
value: skip
brief: "The task run was skipped, eg. due to a precondition not being met."
stability: development
stability: development
brief: >
The result of a task run.
examples: ["success", "failure", "timeout", "skipped"]
- id: cicd.pipeline.task.type
type:
members:
@ -139,6 +173,54 @@ groups:
brief: >
The result of a pipeline run.
examples: ["success", "failure", "timeout", "skipped"]
- id: cicd.pipeline.action.name
type:
members:
- id: build
value: BUILD
brief: The pipeline run is executing a build.
stability: development
- id: run
value: RUN
brief: The pipeline run is executing.
stability: development
- id: sync
value: SYNC
brief: The pipeline run is executing a sync.
stability: development
stability: development
brief: >
The kind of action a pipeline run is performing.
examples: ["BUILD", "RUN", "SYNC"]
- id: cicd.worker.id
type: string
stability: development
brief: The unique identifier of a worker within a CICD system.
examples:
[
"abc123",
"10.0.1.2",
"controller",
]
- id: cicd.worker.name
type: string
stability: development
brief: The name of a worker within a CICD system.
examples:
[
"agent-abc",
"controller",
"Ubuntu LTS"
]
- id: cicd.worker.url.full
type: string
stability: development
brief: The [URL](https://wikipedia.org/wiki/URL) of the worker,
providing the complete address in order to locate and identify the worker.
examples:
[
"https://cicd.example.org/worker/abc123",
]
- id: cicd.worker.state
type:
members:

33
model/cicd/resources.yaml Normal file
View File

@ -0,0 +1,33 @@
groups:
- id: resource.cicd.pipeline
type: resource
stability: development
name: cicd.pipeline
brief: >
A pipeline is a series of automated steps that helps software teams deliver code.
attributes:
- ref: cicd.pipeline.name
- id: resource.cicd.pipeline.run
type: resource
stability: development
name: cicd.pipeline.run
brief: >
A pipeline run is a singular execution of a given pipeline's tasks.
attributes:
- ref: cicd.pipeline.run.id
- ref: cicd.pipeline.run.url.full
- id: resource.cicd.worker
type: resource
stability: development
name: cicd.worker
brief: >
A CICD worker is a component of the CICD system that performs work (eg. running pipeline tasks or performing sync).
attributes:
- ref: cicd.worker.id
requirement_level: required
- ref: cicd.worker.name
- ref: cicd.worker.url.full
requirement_level:
recommended: If available

45
model/cicd/spans.yaml Normal file
View File

@ -0,0 +1,45 @@
groups:
- id: span.cicd.pipeline.run.server
type: span
span_kind: server
brief: This span describes a CICD pipeline run.
note: |
For all pipeline runs, a span with kind `SERVER` SHOULD be created corresponding to the execution of the pipeline run.
**Span name** MUST follow the overall [guidelines for span names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.43.0/specification/trace/api.md#span).
The span name SHOULD be `{action} {pipeline}` if there is a (low-cardinality) pipeline name available.
If the pipeline name is not available or is likely to have high cardinality, then the span name SHOULD be `{action}`.
The `{action}` SHOULD be the [`cicd.pipeline.action.name`](/docs/attributes-registry/cicd.md#cicd-pipeline-action-name).
The `{pipeline}` SHOULD be the [`cicd.pipeline.name`](/docs/attributes-registry/cicd.md#cicd-pipeline-name).
stability: development
attributes:
- ref: cicd.pipeline.result
requirement_level: required
- ref: error.type
requirement_level:
conditionally_required: if the pipeline result is `failure` or `error`
- ref: cicd.pipeline.action.name
requirement_level: opt_in
- id: span.cicd.pipeline.task.internal
type: span
span_kind: internal
brief: This span describes task execution in a pipeline run.
stability: development
attributes:
- ref: cicd.pipeline.task.name
requirement_level: required
sampling_relevant: true
- ref: cicd.pipeline.task.run.id
requirement_level: required
sampling_relevant: true
- ref: cicd.pipeline.task.run.url.full
requirement_level: required
sampling_relevant: true
- ref: cicd.pipeline.task.run.result
requirement_level: required
- ref: error.type
requirement_level:
conditionally_required: if the task result is `failure` or `error`

View File

@ -17,6 +17,8 @@ groups:
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
entity_associations:
- vcs.repo
- id: metric.vcs.change.duration
type: metric
metric_name: vcs.change.duration
@ -37,6 +39,8 @@ groups:
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
entity_associations:
- vcs.repo
- id: metric.vcs.change.time_to_approval
type: metric
metric_name: vcs.change.time_to_approval
@ -61,6 +65,9 @@ groups:
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
entity_associations:
- vcs.repo
- vcs.ref
- id: metric.vcs.change.time_to_merge
type: metric
metric_name: vcs.change.time_to_merge
@ -85,6 +92,9 @@ groups:
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
entity_associations:
- vcs.repo
- vcs.ref
- id: metric.vcs.repository.count
type: metric
metric_name: vcs.repository.count
@ -115,6 +125,8 @@ groups:
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
entity_associations:
- vcs.repo
- id: metric.vcs.ref.lines_delta
type: metric
metric_name: vcs.ref.lines_delta
@ -148,6 +160,8 @@ groups:
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
entity_associations:
- vcs.repo
- id: metric.vcs.ref.revisions_delta
type: metric
metric_name: vcs.ref.revisions_delta
@ -180,6 +194,8 @@ groups:
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
entity_associations:
- vcs.repo
- id: metric.vcs.ref.time
type: metric
metric_name: vcs.ref.time
@ -200,6 +216,8 @@ groups:
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
entity_associations:
- vcs.repo
- id: metric.vcs.contributor.count
type: metric
metric_name: vcs.contributor.count
@ -216,3 +234,5 @@ groups:
requirement_level: recommended
- ref: vcs.provider.name
requirement_level: opt_in
entity_associations:
- vcs.repo

21
model/vcs/resources.yaml Normal file
View File

@ -0,0 +1,21 @@
groups:
- id: resource.vcs.repo
type: resource
stability: development
name: vcs.repo
brief: >
A repository in the Version Control System.
attributes:
- ref: vcs.repository.url.full
- ref: vcs.repository.name
- id: resource.vcs.ref
type: resource
stability: development
name: vcs.ref
brief: >
A reference to a specific version in the Version Control System.
attributes:
- ref: vcs.ref.head.name
- ref: vcs.ref.head.revision
- ref: vcs.ref.type