From 72b225b94cfcf771932adefba7da354ce336bf3b Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Fri, 13 Dec 2024 11:32:29 +0100 Subject: [PATCH 01/31] [cicd] add pipeline run duration metric --- docs/attributes-registry/cicd.md | 13 ++++++ docs/cicd/cicd-metrics.md | 68 +++++++++++++++++++++++++++----- model/cicd/metrics.yaml | 13 ++++++ model/cicd/registry.yaml | 30 ++++++++++++++ 4 files changed, 114 insertions(+), 10 deletions(-) create mode 100644 model/cicd/metrics.yaml diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index 8b585d8fe4..cee1bbf676 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -13,6 +13,7 @@ This group describes attributes specific to pipelines within a Continuous Integr | Attribute | Type | Description | Examples | Stability | |---|---|---|---|---| | `cicd.pipeline.name` | string | The human readable name of the pipeline within a CI/CD system. | `Build and Test`; `Lint`; `Deploy Go Project`; `deploy_to_environment` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.pipeline.result` | string | The result of a pipeline run. | `open`; `closed`; `merged` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.run.id` | string | The unique identifier of a pipeline run within a CI/CD system. | `120912` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.name` | 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.run.id` | string | The unique identifier of a task run within a pipeline. | `12097` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -21,6 +22,18 @@ This group describes attributes specific to pipelines within a Continuous Integr --- +`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 | +|---|---|---| +| `cancelled` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `failure` | The pipeline run did not finish successfully, eg. due to compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `success` | The pipeline run finished successfully. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `timeout` | A timeout caused the pipeline run to be interrupted. | ![Experimental](https://img.shields.io/badge/-experimental-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 | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 687eb76e43..004ee6b8bf 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -10,19 +10,66 @@ linkTitle: CICD metrics -- [VCS Metrics](#vcs-metrics) - - [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.ref.count`](#metric-vcsrefcount) - - [Metric: `vcs.ref.lines_delta`](#metric-vcsreflines_delta) - - [Metric: `vcs.ref.revisions_delta`](#metric-vcsrefrevisions_delta) - - [Metric: `vcs.ref.time`](#metric-vcsreftime) - - [Metric: `vcs.contributor.count`](#metric-vcscontributorcount) +- [Semantic Conventions for CICD Metrics](#semantic-conventions-for-cicd-metrics) + - [CICD Metrics](#cicd-metrics) + - [Metric: `cicd.pipeline.run.duration`](#metric-cicdpipelinerunduration) + - [VCS Metrics](#vcs-metrics) + - [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.ref.count`](#metric-vcsrefcount) + - [Metric: `vcs.ref.lines_delta`](#metric-vcsreflines_delta) + - [Metric: `vcs.ref.revisions_delta`](#metric-vcsrefrevisions_delta) + - [Metric: `vcs.ref.time`](#metric-vcsreftime) + - [Metric: `vcs.contributor.count`](#metric-vcscontributorcount) +## CICD Metrics + +The conventions described in this section are specific to Continuous Integration / Continuous Deployment (CICD) systems. + +**Disclaimer:** These are initial CICD metrics and attributes +but more may be added in the future. + +### Metric: `cicd.pipeline.run.duration` + +This metric is [required][MetricRequired]. + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `cicd.pipeline.run.duration` | Histogram | `s` | Duration of a pipeline run grouped by pipeline and result. | ![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 | +|---|---|---|---|---|---| +| [`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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cicd.pipeline.result`](/docs/attributes-registry/cicd.md) | string | The result of a pipeline run. | `open`; `closed`; `merged` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-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 | +|---|---|---| +| `cancelled` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `failure` | The pipeline run did not finish successfully, eg. due to compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `success` | The pipeline run finished successfully. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `timeout` | A timeout caused the pipeline run to be interrupted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + ## VCS Metrics The conventions described in this section are specific to Version Control Systems. @@ -429,3 +476,4 @@ the same backends. [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status [MetricOptIn]: /docs/general/metric-requirement-level.md#opt-in [MetricRecommended]: /docs/general/metric-requirement-level.md#recommended +[MetricRequired]: /docs/general/metric-requirement-level.md#required diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml new file mode 100644 index 0000000000..d9392f305c --- /dev/null +++ b/model/cicd/metrics.yaml @@ -0,0 +1,13 @@ +groups: + - id: metric.cicd.pipeline.run.duration + type: metric + metric_name: cicd.pipeline.run.duration + brief: 'Duration of a pipeline run grouped by pipeline and result.' + instrument: histogram + unit: "s" + stability: experimental + attributes: + - ref: cicd.pipeline.name + requirement_level: required + - ref: cicd.pipeline.result + requirement_level: required diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index a63903d2c6..9a59df0b81 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -75,3 +75,33 @@ groups: brief: > The type of the task within a pipeline. examples: ["build", "test", "deploy"] + - id: cicd.pipeline.result + type: + members: + - id: success + value: success + brief: "The pipeline run finished successfully." + stability: experimental + - id: failure + value: failure + brief: >- + The pipeline run did not finish successfully, eg. due to compile error or a failing test. + Such failures are usually detected by non-zero exit codes of the tools executed in the pipeline run. + stability: experimental + - id: error + value: error + brief: >- + The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. + stability: experimental + - id: timeout + value: timeout + brief: "A timeout caused the pipeline run to be interrupted." + stability: experimental + - id: cancelled + value: cancelled + brief: "The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run." + stability: experimental + stability: experimental + brief: > + The result of a pipeline run. + examples: ["open", "closed", "merged"] From 1b104594c782b5807dec89b20c6e7c1e7f7297fe Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Fri, 13 Dec 2024 17:51:10 +0100 Subject: [PATCH 02/31] [cicd] add cicd queue metrics --- docs/cicd/cicd-metrics.md | 75 ++++++++++++++++++++++++++++++++------- model/cicd/metrics.yaml | 20 +++++++++++ 2 files changed, 82 insertions(+), 13 deletions(-) diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 004ee6b8bf..2a258adf18 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -10,19 +10,20 @@ linkTitle: CICD metrics -- [Semantic Conventions for CICD Metrics](#semantic-conventions-for-cicd-metrics) - - [CICD Metrics](#cicd-metrics) - - [Metric: `cicd.pipeline.run.duration`](#metric-cicdpipelinerunduration) - - [VCS Metrics](#vcs-metrics) - - [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.ref.count`](#metric-vcsrefcount) - - [Metric: `vcs.ref.lines_delta`](#metric-vcsreflines_delta) - - [Metric: `vcs.ref.revisions_delta`](#metric-vcsrefrevisions_delta) - - [Metric: `vcs.ref.time`](#metric-vcsreftime) - - [Metric: `vcs.contributor.count`](#metric-vcscontributorcount) +- [CICD Metrics](#cicd-metrics) + - [Metric: `cicd.pipeline.run.duration`](#metric-cicdpipelinerunduration) + - [Metric: `cicd.queue.latency`](#metric-cicdqueuelatency) + - [Metric: `cicd.queue.length`](#metric-cicdqueuelength) +- [VCS Metrics](#vcs-metrics) + - [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.ref.count`](#metric-vcsrefcount) + - [Metric: `vcs.ref.lines_delta`](#metric-vcsreflines_delta) + - [Metric: `vcs.ref.revisions_delta`](#metric-vcsrefrevisions_delta) + - [Metric: `vcs.ref.time`](#metric-vcsreftime) + - [Metric: `vcs.contributor.count`](#metric-vcscontributorcount) @@ -70,6 +71,54 @@ This metric is [required][MetricRequired]. +### Metric: `cicd.queue.latency` + +This metric is [required][MetricRecommended]. + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `cicd.queue.latency` | Histogram | `s` | Duration a pipeline run takes from being triggered to the start of execution. | ![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 | +|---|---|---|---|---|---| +| [`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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + +### Metric: `cicd.queue.length` + +This metric is [required][MetricRecommended]. + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `cicd.queue.length` | UpDownCounter | `{pipeline_run}` | The number of pipeline runs waiting for their start of execution. | ![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 | +|---|---|---|---|---|---| +| [`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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + ## VCS Metrics The conventions described in this section are specific to Version Control Systems. diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index d9392f305c..f1c0532972 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -11,3 +11,23 @@ groups: requirement_level: required - ref: cicd.pipeline.result requirement_level: required + - id: metric.cicd.queue.latency + type: metric + metric_name: cicd.queue.latency + brief: 'Duration a pipeline run takes from being triggered to the start of execution.' + instrument: histogram + unit: "s" + stability: experimental + attributes: + - ref: cicd.pipeline.name + requirement_level: recommended + - id: metric.cicd.queue.length + type: metric + metric_name: cicd.queue.length + brief: 'The number of pipeline runs waiting for their start of execution.' + instrument: updowncounter + unit: "{pipeline_run}" + stability: experimental + attributes: + - ref: cicd.pipeline.name + requirement_level: recommended From d8205860f7750503fe9d114d963f511d7c33656d Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Fri, 13 Dec 2024 18:19:29 +0100 Subject: [PATCH 03/31] [cicd] add cicd worker count metric --- docs/attributes-registry/cicd.md | 20 +++++++++++++++ docs/cicd/cicd-metrics.md | 44 ++++++++++++++++++++++++++++++++ model/cicd/metrics.yaml | 12 +++++++++ model/cicd/registry.yaml | 30 ++++++++++++++++++++++ 4 files changed, 106 insertions(+) diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index cee1bbf676..808d69f794 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -19,6 +19,8 @@ This group describes attributes specific to pipelines within a Continuous Integr | `cicd.pipeline.task.run.id` | string | The unique identifier of a task run within a pipeline. | `12097` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.run.url.full` | 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/job/26920038674?pr=1075` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.type` | string | The type of the task within a pipeline. | `build`; `test`; `deploy` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.worker.state` | string | The state of a CICD worker / agent. | `idle`; `busy` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.worker.type` | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- @@ -41,3 +43,21 @@ This group describes attributes specific to pipelines within a Continuous Integr | `build` | build | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `deploy` | deploy | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `test` | test | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +--- + +`cicd.worker.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `busy` | The worker is performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `idle` | The worker is not performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +--- + +`cicd.worker.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 | +|---|---|---| +| `pod` | One or more containers deployed together. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vm` | A virtual machine or baremetal host. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 2a258adf18..249750522b 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -14,6 +14,7 @@ linkTitle: CICD metrics - [Metric: `cicd.pipeline.run.duration`](#metric-cicdpipelinerunduration) - [Metric: `cicd.queue.latency`](#metric-cicdqueuelatency) - [Metric: `cicd.queue.length`](#metric-cicdqueuelength) + - [Metric: `cicd.worker.count`](#metric-cicdworkercount) - [VCS Metrics](#vcs-metrics) - [Metric: `vcs.change.count`](#metric-vcschangecount) - [Metric: `vcs.change.duration`](#metric-vcschangeduration) @@ -119,6 +120,49 @@ This metric is [required][MetricRecommended]. +### Metric: `cicd.worker.count` + +This metric is [required][MetricRecommended]. + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `cicd.worker.count` | UpDownCounter | `{count}` | The number of workers available to the CICD system and/or busy. | ![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 | +|---|---|---|---|---|---| +| [`cicd.worker.state`](/docs/attributes-registry/cicd.md) | string | The state of a CICD worker / agent. | `idle`; `busy` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cicd.worker.type`](/docs/attributes-registry/cicd.md) | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +--- + +`cicd.worker.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. + +| Value | Description | Stability | +|---|---|---| +| `busy` | The worker is performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `idle` | The worker is not performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +--- + +`cicd.worker.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 | +|---|---|---| +| `pod` | One or more containers deployed together. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vm` | A virtual machine or baremetal host. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + ## VCS Metrics The conventions described in this section are specific to Version Control Systems. diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index f1c0532972..8302cba7b2 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -31,3 +31,15 @@ groups: attributes: - ref: cicd.pipeline.name requirement_level: recommended + - id: metric.cicd.worker.count + type: metric + metric_name: cicd.worker.count + brief: 'The number of workers available to the CICD system and/or busy.' + instrument: updowncounter + unit: "{count}" + stability: experimental + attributes: + - ref: cicd.worker.type + requirement_level: required + - ref: cicd.worker.state + requirement_level: required diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index 9a59df0b81..f34d08ed29 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -105,3 +105,33 @@ groups: brief: > The result of a pipeline run. examples: ["open", "closed", "merged"] + - id: cicd.worker.type + type: + members: + - id: vm + value: vm + brief: "A virtual machine or baremetal host." + stability: experimental + - id: pod + value: pod + brief: "One or more containers deployed together." + stability: experimental + stability: experimental + brief: > + The type of worker / agent used by the CICD system. + examples: ["vm", "pod"] + - id: cicd.worker.state + type: + members: + - id: idle + value: idle + brief: "The worker is not performing work for the CICD system." + stability: experimental + - id: busy + value: busy + brief: "The worker is performing work for the CICD system." + stability: experimental + stability: experimental + brief: > + The state of a CICD worker / agent. + examples: ["idle", "busy"] From a2edc1662403064a7535bef7763e28372cb8e2bf Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Fri, 13 Dec 2024 18:25:17 +0100 Subject: [PATCH 04/31] [cicd] add cicd error count --- docs/cicd/cicd-metrics.md | 53 +++++++++++++++++++++++++++++++++++++++ model/cicd/metrics.yaml | 10 ++++++++ 2 files changed, 63 insertions(+) diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 249750522b..7bc89f79d1 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -15,6 +15,7 @@ linkTitle: CICD metrics - [Metric: `cicd.queue.latency`](#metric-cicdqueuelatency) - [Metric: `cicd.queue.length`](#metric-cicdqueuelength) - [Metric: `cicd.worker.count`](#metric-cicdworkercount) + - [Metric: `cicd.errors`](#metric-cicderrors) - [VCS Metrics](#vcs-metrics) - [Metric: `vcs.change.count`](#metric-vcschangecount) - [Metric: `vcs.change.duration`](#metric-vcschangeduration) @@ -163,6 +164,58 @@ This metric is [required][MetricRecommended]. +### Metric: `cicd.errors` + +This metric is [required][MetricRecommended]. + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `cicd.errors` | Counter | `{error}` | The number of errors in the controller of the CICD system. | ![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 | +|---|---|---|---|---|---| +| [`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` | `Required` | ![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. + +--- + +`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) | + + + + + + ## VCS Metrics The conventions described in this section are specific to Version Control Systems. diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index 8302cba7b2..ae2ea4ec90 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -43,3 +43,13 @@ groups: requirement_level: required - ref: cicd.worker.state requirement_level: required + - id: metric.cicd.errors + type: metric + metric_name: cicd.errors + brief: 'The number of errors in the controller of the CICD system.' + instrument: counter + unit: "{error}" + stability: experimental + attributes: + - ref: error.type + requirement_level: required From 3e1537b841b45b8fcf06c9d2540ca6667e3f8b81 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Fri, 13 Dec 2024 18:39:53 +0100 Subject: [PATCH 05/31] Update vscode settings to align with markdown-toc --no-first-h1 --- .vscode/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 069acb27c7..f1709edc98 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,5 +14,6 @@ "model/**/*.yaml" ] }, - "json.schemaDownload.enable": true + "json.schemaDownload.enable": true, + "markdown.extension.toc.levels": "2..6" } From 7d4affa0e3ea3a5d4af962029ad15cc14989a086 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Fri, 13 Dec 2024 18:43:21 +0100 Subject: [PATCH 06/31] [cicd] update examples of cicd.pipeline.result --- docs/attributes-registry/cicd.md | 2 +- docs/cicd/cicd-metrics.md | 2 +- model/cicd/registry.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index 808d69f794..30490b08d2 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -13,7 +13,7 @@ This group describes attributes specific to pipelines within a Continuous Integr | Attribute | Type | Description | Examples | Stability | |---|---|---|---|---| | `cicd.pipeline.name` | string | The human readable name of the pipeline within a CI/CD system. | `Build and Test`; `Lint`; `Deploy Go Project`; `deploy_to_environment` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cicd.pipeline.result` | string | The result of a pipeline run. | `open`; `closed`; `merged` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.pipeline.result` | string | The result of a pipeline run. | `success`; `failure`; `timeout` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.run.id` | string | The unique identifier of a pipeline run within a CI/CD system. | `120912` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.name` | 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.run.id` | string | The unique identifier of a task run within a pipeline. | `12097` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 7bc89f79d1..10efd446e8 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -54,7 +54,7 @@ This metric is [required][MetricRequired]. | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`cicd.pipeline.result`](/docs/attributes-registry/cicd.md) | string | The result of a pipeline run. | `open`; `closed`; `merged` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cicd.pipeline.result`](/docs/attributes-registry/cicd.md) | string | The result of a pipeline run. | `success`; `failure`; `timeout` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index f34d08ed29..eb9b5bf51f 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -104,7 +104,7 @@ groups: stability: experimental brief: > The result of a pipeline run. - examples: ["open", "closed", "merged"] + examples: ["success", "failure", "timeout"] - id: cicd.worker.type type: members: From 70f2bd630de17b1aaa7646c130f792e3e30e4219 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Fri, 13 Dec 2024 19:00:38 +0100 Subject: [PATCH 07/31] [cicd] add changelog entry --- .chloggen/1600-cicd-metrics.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .chloggen/1600-cicd-metrics.yaml diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml new file mode 100644 index 0000000000..12e1ba2810 --- /dev/null +++ b/.chloggen/1600-cicd-metrics.yaml @@ -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 CICD metrics + +# 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: [1600] + +# (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: | + Makes the following changes: + + - Add metrics `cicd.pipeline.run.duration`, `cicd.queue.latency`, `cicd.queue.length`, `cicd.worker.count`, `cicd.errors`. + - The CICD attributes `cicd.pipeline.result`, `cicd.worker.state` and `cicd.worker.type` have been added to the registry. From 1c4e584ef2599a992ad4363ab54064956190dbb8 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Fri, 13 Dec 2024 19:20:09 +0100 Subject: [PATCH 08/31] [cicd] update brief to add missing article --- docs/attributes-registry/cicd.md | 2 +- docs/cicd/cicd-metrics.md | 2 +- model/cicd/registry.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index 30490b08d2..d824441d73 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -30,7 +30,7 @@ This group describes attributes specific to pipelines within a Continuous Integr |---|---|---| | `cancelled` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `failure` | The pipeline run did not finish successfully, eg. due to compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `success` | The pipeline run finished successfully. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `timeout` | A timeout caused the pipeline run to be interrupted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 10efd446e8..7606980512 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -64,7 +64,7 @@ This metric is [required][MetricRequired]. |---|---|---| | `cancelled` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `failure` | The pipeline run did not finish successfully, eg. due to compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `success` | The pipeline run finished successfully. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `timeout` | A timeout caused the pipeline run to be interrupted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index eb9b5bf51f..851873ceaf 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -85,7 +85,7 @@ groups: - id: failure value: failure brief: >- - The pipeline run did not finish successfully, eg. due to compile error or a failing test. + 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. stability: experimental - id: error From 2f9b857b2d3ed3f5a56ef26789007542b1b3de08 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Fri, 13 Dec 2024 19:21:39 +0100 Subject: [PATCH 09/31] [cicd] improve metric brief --- docs/cicd/cicd-metrics.md | 2 +- model/cicd/metrics.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 7606980512..90a9908059 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -86,7 +86,7 @@ This metric is [required][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `cicd.queue.latency` | Histogram | `s` | Duration a pipeline run takes from being triggered to the start of execution. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.queue.latency` | Histogram | `s` | The duration a pipeline run takes from being triggered to the start of execution. | ![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/cicd/metrics.yaml b/model/cicd/metrics.yaml index ae2ea4ec90..cd035031ca 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -14,7 +14,7 @@ groups: - id: metric.cicd.queue.latency type: metric metric_name: cicd.queue.latency - brief: 'Duration a pipeline run takes from being triggered to the start of execution.' + brief: 'The duration a pipeline run takes from being triggered to the start of execution.' instrument: histogram unit: "s" stability: experimental From a0443412ee94ab6c220c1a22247736b39e3e8fde Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Sat, 14 Dec 2024 11:50:35 +0100 Subject: [PATCH 10/31] [cicd] add skipped as possible cicd.pipeline.result value --- docs/attributes-registry/cicd.md | 3 ++- docs/cicd/cicd-metrics.md | 3 ++- model/cicd/registry.yaml | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index d824441d73..f5158f1019 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -13,7 +13,7 @@ This group describes attributes specific to pipelines within a Continuous Integr | Attribute | Type | Description | Examples | Stability | |---|---|---|---|---| | `cicd.pipeline.name` | string | The human readable name of the pipeline within a CI/CD system. | `Build and Test`; `Lint`; `Deploy Go Project`; `deploy_to_environment` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cicd.pipeline.result` | string | The result of a pipeline run. | `success`; `failure`; `timeout` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.pipeline.result` | string | The result of a pipeline run. | `success`; `failure`; `timeout`; `skipped` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.run.id` | string | The unique identifier of a pipeline run within a CI/CD system. | `120912` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.name` | 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.run.id` | string | The unique identifier of a task run within a pipeline. | `12097` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -31,6 +31,7 @@ This group describes attributes specific to pipelines within a Continuous Integr | `cancelled` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Experimental](https://img.shields.io/badge/-experimental-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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `skipped` | The pipeline run was skipped, eg. due to a precondition not being met. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `success` | The pipeline run finished successfully. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `timeout` | A timeout caused the pipeline run to be interrupted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 90a9908059..9235bca392 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -54,7 +54,7 @@ This metric is [required][MetricRequired]. | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`cicd.pipeline.result`](/docs/attributes-registry/cicd.md) | string | The result of a pipeline run. | `success`; `failure`; `timeout` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cicd.pipeline.result`](/docs/attributes-registry/cicd.md) | string | The result of a pipeline run. | `success`; `failure`; `timeout`; `skipped` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- @@ -65,6 +65,7 @@ This metric is [required][MetricRequired]. | `cancelled` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Experimental](https://img.shields.io/badge/-experimental-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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `skipped` | The pipeline run was skipped, eg. due to a precondition not being met. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `success` | The pipeline run finished successfully. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `timeout` | A timeout caused the pipeline run to be interrupted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index 851873ceaf..14d9b34066 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -101,10 +101,14 @@ groups: value: cancelled brief: "The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run." stability: experimental + - id: skipped + value: skipped + brief: "The pipeline run was skipped, eg. due to a precondition not being met." + stability: experimental stability: experimental brief: > The result of a pipeline run. - examples: ["success", "failure", "timeout"] + examples: ["success", "failure", "timeout", "skipped"] - id: cicd.worker.type type: members: From 7330043f03834f396be3a0d8800d1473ec63784a Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Sat, 14 Dec 2024 11:52:32 +0100 Subject: [PATCH 11/31] [cicd] add down as possible cicd.worker.state value --- docs/attributes-registry/cicd.md | 3 ++- docs/cicd/cicd-metrics.md | 3 ++- model/cicd/registry.yaml | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index f5158f1019..96e001ee7e 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -19,7 +19,7 @@ This group describes attributes specific to pipelines within a Continuous Integr | `cicd.pipeline.task.run.id` | string | The unique identifier of a task run within a pipeline. | `12097` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.run.url.full` | 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/job/26920038674?pr=1075` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.type` | string | The type of the task within a pipeline. | `build`; `test`; `deploy` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cicd.worker.state` | string | The state of a CICD worker / agent. | `idle`; `busy` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.worker.state` | string | The state of a CICD worker / agent. | `idle`; `busy`; `down` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.worker.type` | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- @@ -52,6 +52,7 @@ This group describes attributes specific to pipelines within a Continuous Integr | Value | Description | Stability | |---|---|---| | `busy` | The worker is performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `down` | The worker is not available to the CICD system (disconnected / down). | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `idle` | The worker is not performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 9235bca392..6ae3182ca5 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -139,7 +139,7 @@ This metric is [required][MetricRecommended]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`cicd.worker.state`](/docs/attributes-registry/cicd.md) | string | The state of a CICD worker / agent. | `idle`; `busy` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| [`cicd.worker.state`](/docs/attributes-registry/cicd.md) | string | The state of a CICD worker / agent. | `idle`; `busy`; `down` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`cicd.worker.type`](/docs/attributes-registry/cicd.md) | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- @@ -149,6 +149,7 @@ This metric is [required][MetricRecommended]. | Value | Description | Stability | |---|---|---| | `busy` | The worker is performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `down` | The worker is not available to the CICD system (disconnected / down). | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `idle` | The worker is not performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index 14d9b34066..6134e11a92 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -135,7 +135,11 @@ groups: value: busy brief: "The worker is performing work for the CICD system." stability: experimental + - id: down + value: down + brief: "The worker is not available to the CICD system (disconnected / down)." + stability: experimental stability: experimental brief: > The state of a CICD worker / agent. - examples: ["idle", "busy"] + examples: ["idle", "busy", "down"] From a24308478e949f15bbfb1ca53f8f0b7ab75e0cd1 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Sat, 14 Dec 2024 11:58:50 +0100 Subject: [PATCH 12/31] [cicd] improve brief and add note for idle cicd.worker.state --- docs/attributes-registry/cicd.md | 4 +++- docs/cicd/cicd-metrics.md | 4 +++- model/cicd/registry.yaml | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index 96e001ee7e..d86447bccf 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -53,7 +53,9 @@ This group describes attributes specific to pipelines within a Continuous Integr |---|---|---| | `busy` | The worker is performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `down` | The worker is not available to the CICD system (disconnected / down). | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `idle` | The worker is not performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `idle` | The worker is not performing work for the CICD system. It is available to the CICD system to perform work on. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +**[1]:** Pipelines might have conditions on which workers they are able to run so not every worker might be available to every pipeline. --- diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 6ae3182ca5..714ba8bca2 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -150,7 +150,9 @@ This metric is [required][MetricRecommended]. |---|---|---| | `busy` | The worker is performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `down` | The worker is not available to the CICD system (disconnected / down). | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `idle` | The worker is not performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `idle` | The worker is not performing work for the CICD system. It is available to the CICD system to perform work on. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +**[1]:** Pipelines might have conditions on which workers they are able to run so not every worker might be available to every pipeline. --- diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index 6134e11a92..ef4b3ef48d 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -129,7 +129,10 @@ groups: members: - id: idle value: idle - brief: "The worker is not performing work for the CICD system." + brief: >- + The worker is not performing work for the CICD system. + It is available to the CICD system to perform work on. + note: "Pipelines might have conditions on which workers they are able to run so not every worker might be available to every pipeline." stability: experimental - id: busy value: busy From 3a31dd93497adeed0413c1cdebed1015856d69bd Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Sat, 14 Dec 2024 12:01:47 +0100 Subject: [PATCH 13/31] [cicd] add metric cicd.pipeline.run.executing --- .chloggen/1600-cicd-metrics.yaml | 2 +- docs/cicd/cicd-metrics.md | 25 +++++++++++++++++++++++++ model/cicd/metrics.yaml | 10 ++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml index 12e1ba2810..8778090c35 100644 --- a/.chloggen/1600-cicd-metrics.yaml +++ b/.chloggen/1600-cicd-metrics.yaml @@ -22,5 +22,5 @@ issues: [1600] subtext: | Makes the following changes: - - Add metrics `cicd.pipeline.run.duration`, `cicd.queue.latency`, `cicd.queue.length`, `cicd.worker.count`, `cicd.errors`. + - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.executing`, `cicd.queue.latency`, `cicd.queue.length`, `cicd.worker.count`, `cicd.errors`. - The CICD attributes `cicd.pipeline.result`, `cicd.worker.state` and `cicd.worker.type` have been added to the registry. diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 714ba8bca2..eadbba7f08 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -12,6 +12,7 @@ linkTitle: CICD metrics - [CICD Metrics](#cicd-metrics) - [Metric: `cicd.pipeline.run.duration`](#metric-cicdpipelinerunduration) + - [Metric: `cicd.pipeline.run.executing`](#metric-cicdpipelinerunexecuting) - [Metric: `cicd.queue.latency`](#metric-cicdqueuelatency) - [Metric: `cicd.queue.length`](#metric-cicdqueuelength) - [Metric: `cicd.worker.count`](#metric-cicdworkercount) @@ -74,6 +75,30 @@ This metric is [required][MetricRequired]. +### Metric: `cicd.pipeline.run.executing` + +This metric is [required][MetricRecommended]. + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `cicd.pipeline.run.executing` | UpDownCounter | `{pipeline_run}` | The number of pipeline runs currently executing. | ![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 | +|---|---|---|---|---|---| +| [`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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + + + + + + ### Metric: `cicd.queue.latency` This metric is [required][MetricRecommended]. diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index cd035031ca..d638c4953b 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -11,6 +11,16 @@ groups: requirement_level: required - ref: cicd.pipeline.result requirement_level: required + - id: metric.cicd.pipeline.run.executing + type: metric + metric_name: cicd.pipeline.run.executing + brief: 'The number of pipeline runs currently executing.' + instrument: updowncounter + unit: "{pipeline_run}" + stability: experimental + attributes: + - ref: cicd.pipeline.name + requirement_level: required - id: metric.cicd.queue.latency type: metric metric_name: cicd.queue.latency From 66732c5f627a60e5ea1d0f337b0914ce33f1ebeb Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Mon, 16 Dec 2024 15:37:11 +0100 Subject: [PATCH 14/31] [cicd] add cicd.worker.type container --- docs/attributes-registry/cicd.md | 1 + docs/cicd/cicd-metrics.md | 1 + model/cicd/registry.yaml | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index d86447bccf..898813cc97 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -63,5 +63,6 @@ This group describes attributes specific to pipelines within a Continuous Integr | Value | Description | Stability | |---|---|---| +| `container` | A single container. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `pod` | One or more containers deployed together. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `vm` | A virtual machine or baremetal host. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index eadbba7f08..373bde1cb9 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -185,6 +185,7 @@ This metric is [required][MetricRecommended]. | Value | Description | Stability | |---|---|---| +| `container` | A single container. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `pod` | One or more containers deployed together. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `vm` | A virtual machine or baremetal host. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index ef4b3ef48d..2f5bc3ce42 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -116,6 +116,10 @@ groups: value: vm brief: "A virtual machine or baremetal host." stability: experimental + - id: container + value: container + brief: "A single container." + stability: experimental - id: pod value: pod brief: "One or more containers deployed together." From 2e8ab020d76f30a871608564af94dc1852ba6675 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Mon, 16 Dec 2024 16:59:46 +0100 Subject: [PATCH 15/31] [cicd] mark all cicd metrics as recommended --- docs/cicd/cicd-metrics.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 373bde1cb9..12ce5c3bef 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -39,7 +39,7 @@ but more may be added in the future. ### Metric: `cicd.pipeline.run.duration` -This metric is [required][MetricRequired]. +This metric is [recommended][MetricRecommended]. @@ -77,7 +77,7 @@ This metric is [required][MetricRequired]. ### Metric: `cicd.pipeline.run.executing` -This metric is [required][MetricRecommended]. +This metric is [recommended][MetricRecommended]. @@ -101,7 +101,7 @@ This metric is [required][MetricRecommended]. ### Metric: `cicd.queue.latency` -This metric is [required][MetricRecommended]. +This metric is [recommended][MetricRecommended]. @@ -125,7 +125,7 @@ This metric is [required][MetricRecommended]. ### Metric: `cicd.queue.length` -This metric is [required][MetricRecommended]. +This metric is [recommended][MetricRecommended]. @@ -149,7 +149,7 @@ This metric is [required][MetricRecommended]. ### Metric: `cicd.worker.count` -This metric is [required][MetricRecommended]. +This metric is [recommended][MetricRecommended]. @@ -196,7 +196,7 @@ This metric is [required][MetricRecommended]. ### Metric: `cicd.errors` -This metric is [required][MetricRecommended]. +This metric is [recommended][MetricRecommended]. @@ -652,4 +652,3 @@ the same backends. [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status [MetricOptIn]: /docs/general/metric-requirement-level.md#opt-in [MetricRecommended]: /docs/general/metric-requirement-level.md#recommended -[MetricRequired]: /docs/general/metric-requirement-level.md#required From dc09536748e52ae2edc25ab56b1335e171c53bbb Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Wed, 25 Dec 2024 19:30:24 +0100 Subject: [PATCH 16/31] [cicd] improve brief of `cicd.worker.count` metric --- docs/cicd/cicd-metrics.md | 2 +- model/cicd/metrics.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 12ce5c3bef..095ec754d1 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -160,7 +160,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `cicd.worker.count` | UpDownCounter | `{count}` | The number of workers available to the CICD system and/or busy. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.worker.count` | UpDownCounter | `{count}` | The number of workers on the CICD system by type and status. | ![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/cicd/metrics.yaml b/model/cicd/metrics.yaml index d638c4953b..0a3651f5cc 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -44,7 +44,7 @@ groups: - id: metric.cicd.worker.count type: metric metric_name: cicd.worker.count - brief: 'The number of workers available to the CICD system and/or busy.' + brief: 'The number of workers on the CICD system by type and status.' instrument: updowncounter unit: "{count}" stability: experimental From 26d3064808bb0ead5fcd0db81af2fa04820f696a Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Wed, 25 Dec 2024 19:33:30 +0100 Subject: [PATCH 17/31] [cicd] renamed attribute `cicd.worker.type` to `cicd.worker.class` --- .chloggen/1600-cicd-metrics.yaml | 2 +- docs/attributes-registry/cicd.md | 22 +++++++++++----------- docs/cicd/cicd-metrics.md | 22 +++++++++++----------- model/cicd/metrics.yaml | 2 +- model/cicd/registry.yaml | 2 +- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml index 8778090c35..724de71ed3 100644 --- a/.chloggen/1600-cicd-metrics.yaml +++ b/.chloggen/1600-cicd-metrics.yaml @@ -23,4 +23,4 @@ subtext: | Makes the following changes: - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.executing`, `cicd.queue.latency`, `cicd.queue.length`, `cicd.worker.count`, `cicd.errors`. - - The CICD attributes `cicd.pipeline.result`, `cicd.worker.state` and `cicd.worker.type` have been added to the registry. + - The CICD attributes `cicd.pipeline.result`, `cicd.worker.state` and `cicd.worker.class` have been added to the registry. diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index 898813cc97..8e7ef614b5 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -19,8 +19,8 @@ This group describes attributes specific to pipelines within a Continuous Integr | `cicd.pipeline.task.run.id` | string | The unique identifier of a task run within a pipeline. | `12097` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.run.url.full` | 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/job/26920038674?pr=1075` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.type` | string | The type of the task within a pipeline. | `build`; `test`; `deploy` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.worker.class` | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.worker.state` | string | The state of a CICD worker / agent. | `idle`; `busy`; `down` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cicd.worker.type` | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- @@ -47,22 +47,22 @@ This group describes attributes specific to pipelines within a Continuous Integr --- -`cicd.worker.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. +`cicd.worker.class` 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 | |---|---|---| -| `busy` | The worker is performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `down` | The worker is not available to the CICD system (disconnected / down). | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `idle` | The worker is not performing work for the CICD system. It is available to the CICD system to perform work on. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - -**[1]:** Pipelines might have conditions on which workers they are able to run so not every worker might be available to every pipeline. +| `container` | A single container. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `pod` | One or more containers deployed together. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vm` | A virtual machine or baremetal host. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- -`cicd.worker.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. +`cicd.worker.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | |---|---|---| -| `container` | A single container. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `pod` | One or more containers deployed together. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `vm` | A virtual machine or baremetal host. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `busy` | The worker is performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `down` | The worker is not available to the CICD system (disconnected / down). | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `idle` | The worker is not performing work for the CICD system. It is available to the CICD system to perform work on. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +**[1]:** Pipelines might have conditions on which workers they are able to run so not every worker might be available to every pipeline. diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 095ec754d1..e784f3d82f 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -164,30 +164,30 @@ This metric is [recommended][MetricRecommended]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| +| [`cicd.worker.class`](/docs/attributes-registry/cicd.md) | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`cicd.worker.state`](/docs/attributes-registry/cicd.md) | string | The state of a CICD worker / agent. | `idle`; `busy`; `down` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| [`cicd.worker.type`](/docs/attributes-registry/cicd.md) | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- -`cicd.worker.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. +`cicd.worker.class` 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 | |---|---|---| -| `busy` | The worker is performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `down` | The worker is not available to the CICD system (disconnected / down). | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `idle` | The worker is not performing work for the CICD system. It is available to the CICD system to perform work on. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - -**[1]:** Pipelines might have conditions on which workers they are able to run so not every worker might be available to every pipeline. +| `container` | A single container. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `pod` | One or more containers deployed together. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `vm` | A virtual machine or baremetal host. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- -`cicd.worker.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. +`cicd.worker.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | |---|---|---| -| `container` | A single container. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `pod` | One or more containers deployed together. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `vm` | A virtual machine or baremetal host. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `busy` | The worker is performing work for the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `down` | The worker is not available to the CICD system (disconnected / down). | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `idle` | The worker is not performing work for the CICD system. It is available to the CICD system to perform work on. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +**[1]:** Pipelines might have conditions on which workers they are able to run so not every worker might be available to every pipeline. diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index 0a3651f5cc..8142928240 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -49,7 +49,7 @@ groups: unit: "{count}" stability: experimental attributes: - - ref: cicd.worker.type + - ref: cicd.worker.class requirement_level: required - ref: cicd.worker.state requirement_level: required diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index 2f5bc3ce42..5155b06452 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -109,7 +109,7 @@ groups: brief: > The result of a pipeline run. examples: ["success", "failure", "timeout", "skipped"] - - id: cicd.worker.type + - id: cicd.worker.class type: members: - id: vm From a2202cd19505740dc7aa10bf2a6579c1d45a143e Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Wed, 25 Dec 2024 19:37:12 +0100 Subject: [PATCH 18/31] [cicd] adapt metric brief following attribute rename --- docs/cicd/cicd-metrics.md | 2 +- model/cicd/metrics.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index e784f3d82f..1d34365d8a 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -160,7 +160,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `cicd.worker.count` | UpDownCounter | `{count}` | The number of workers on the CICD system by type and status. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.worker.count` | UpDownCounter | `{count}` | The number of workers on the CICD system by class and status. | ![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/cicd/metrics.yaml b/model/cicd/metrics.yaml index 8142928240..5524fbe979 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -44,7 +44,7 @@ groups: - id: metric.cicd.worker.count type: metric metric_name: cicd.worker.count - brief: 'The number of workers on the CICD system by type and status.' + brief: 'The number of workers on the CICD system by class and status.' instrument: updowncounter unit: "{count}" stability: experimental From 89f6a8f2b7ea9253495c96293b2c7a1a154d348e Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 21:12:38 +0100 Subject: [PATCH 19/31] [cicd] rename unit {pipeline_run} to {run} --- docs/cicd/cicd-metrics.md | 4 ++-- model/cicd/metrics.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 1d34365d8a..88c76f592c 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -88,7 +88,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `cicd.pipeline.run.executing` | UpDownCounter | `{pipeline_run}` | The number of pipeline runs currently executing. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.pipeline.run.executing` | UpDownCounter | `{run}` | The number of pipeline runs currently executing. | ![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 | |---|---|---|---|---|---| @@ -136,7 +136,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `cicd.queue.length` | UpDownCounter | `{pipeline_run}` | The number of pipeline runs waiting for their start of execution. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.queue.length` | UpDownCounter | `{run}` | The number of pipeline runs waiting for their start of execution. | ![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/cicd/metrics.yaml b/model/cicd/metrics.yaml index 5524fbe979..05b426bdea 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -16,7 +16,7 @@ groups: metric_name: cicd.pipeline.run.executing brief: 'The number of pipeline runs currently executing.' instrument: updowncounter - unit: "{pipeline_run}" + unit: "{run}" stability: experimental attributes: - ref: cicd.pipeline.name @@ -36,7 +36,7 @@ groups: metric_name: cicd.queue.length brief: 'The number of pipeline runs waiting for their start of execution.' instrument: updowncounter - unit: "{pipeline_run}" + unit: "{run}" stability: experimental attributes: - ref: cicd.pipeline.name From 81c440745a18b5a0865535bee182e6d5168a376e Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 21:16:22 +0100 Subject: [PATCH 20/31] [cicd] use consistent naming for cicd.pipeline.result values --- docs/attributes-registry/cicd.md | 4 ++-- docs/cicd/cicd-metrics.md | 4 ++-- model/cicd/registry.yaml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index 8e7ef614b5..3f5d5f4cd7 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -28,10 +28,10 @@ This group describes attributes specific to pipelines within a Continuous Integr | Value | Description | Stability | |---|---|---| -| `cancelled` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cancel` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Experimental](https://img.shields.io/badge/-experimental-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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `skipped` | The pipeline run was skipped, eg. due to a precondition not being met. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `skip` | The pipeline run was skipped, eg. due to a precondition not being met. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `success` | The pipeline run finished successfully. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `timeout` | A timeout caused the pipeline run to be interrupted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 88c76f592c..1281bc416f 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -63,10 +63,10 @@ This metric is [recommended][MetricRecommended]. | Value | Description | Stability | |---|---|---| -| `cancelled` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cancel` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Experimental](https://img.shields.io/badge/-experimental-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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `skipped` | The pipeline run was skipped, eg. due to a precondition not being met. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `skip` | The pipeline run was skipped, eg. due to a precondition not being met. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `success` | The pipeline run finished successfully. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `timeout` | A timeout caused the pipeline run to be interrupted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index 5155b06452..3d51cb6c36 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -97,12 +97,12 @@ groups: value: timeout brief: "A timeout caused the pipeline run to be interrupted." stability: experimental - - id: cancelled - value: cancelled + - id: cancel + value: cancel brief: "The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run." stability: experimental - - id: skipped - value: skipped + - id: skip + value: skip brief: "The pipeline run was skipped, eg. due to a precondition not being met." stability: experimental stability: experimental From c1bc664e38ce765d6138c254094c39459f369108 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 21:28:23 +0100 Subject: [PATCH 21/31] [cicd] add error.type attribute to cicd.pipeline.run.duration metric --- docs/cicd/cicd-metrics.md | 29 +++++++++++++++++++++++++++++ model/cicd/metrics.yaml | 3 +++ 2 files changed, 32 insertions(+) diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 1281bc416f..f8282c8788 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -56,6 +56,27 @@ This metric is [recommended][MetricRecommended]. |---|---|---|---|---|---| | [`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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`cicd.pipeline.result`](/docs/attributes-registry/cicd.md) | string | The result of a pipeline run. | `success`; `failure`; `timeout`; `skipped` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-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 and only if the pipeline run failed. | ![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. --- @@ -70,6 +91,14 @@ This metric is [recommended][MetricRecommended]. | `success` | The pipeline run finished successfully. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `timeout` | A timeout caused the pipeline run to be interrupted. | ![Experimental](https://img.shields.io/badge/-experimental-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) | + diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index 05b426bdea..27ea424124 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -11,6 +11,9 @@ groups: requirement_level: required - ref: cicd.pipeline.result requirement_level: required + - ref: error.type + requirement_level: + conditionally_required: If and only if the pipeline run failed. - id: metric.cicd.pipeline.run.executing type: metric metric_name: cicd.pipeline.run.executing From 226b835b3f835985f7e222862cd9fd5bf0d9fa67 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 21:32:56 +0100 Subject: [PATCH 22/31] [cicd] rename metric cicd.pipeline.run.executing to cicd.pipeline.run.active --- .chloggen/1600-cicd-metrics.yaml | 2 +- docs/cicd/cicd-metrics.md | 8 ++++---- model/cicd/metrics.yaml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml index 724de71ed3..628731e5fd 100644 --- a/.chloggen/1600-cicd-metrics.yaml +++ b/.chloggen/1600-cicd-metrics.yaml @@ -22,5 +22,5 @@ issues: [1600] subtext: | Makes the following changes: - - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.executing`, `cicd.queue.latency`, `cicd.queue.length`, `cicd.worker.count`, `cicd.errors`. + - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.queue.latency`, `cicd.queue.length`, `cicd.worker.count`, `cicd.errors`. - The CICD attributes `cicd.pipeline.result`, `cicd.worker.state` and `cicd.worker.class` have been added to the registry. diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index f8282c8788..c448828498 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -12,7 +12,7 @@ linkTitle: CICD metrics - [CICD Metrics](#cicd-metrics) - [Metric: `cicd.pipeline.run.duration`](#metric-cicdpipelinerunduration) - - [Metric: `cicd.pipeline.run.executing`](#metric-cicdpipelinerunexecuting) + - [Metric: `cicd.pipeline.run.active`](#metric-cicdpipelinerunactive) - [Metric: `cicd.queue.latency`](#metric-cicdqueuelatency) - [Metric: `cicd.queue.length`](#metric-cicdqueuelength) - [Metric: `cicd.worker.count`](#metric-cicdworkercount) @@ -104,11 +104,11 @@ it's RECOMMENDED to: -### Metric: `cicd.pipeline.run.executing` +### Metric: `cicd.pipeline.run.active` This metric is [recommended][MetricRecommended]. - + @@ -117,7 +117,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `cicd.pipeline.run.executing` | UpDownCounter | `{run}` | The number of pipeline runs currently executing. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.pipeline.run.active` | UpDownCounter | `{run}` | The number of pipeline runs currently executing. | ![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/cicd/metrics.yaml b/model/cicd/metrics.yaml index 27ea424124..abca3f6ac2 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -14,9 +14,9 @@ groups: - ref: error.type requirement_level: conditionally_required: If and only if the pipeline run failed. - - id: metric.cicd.pipeline.run.executing + - id: metric.cicd.pipeline.run.active type: metric - metric_name: cicd.pipeline.run.executing + metric_name: cicd.pipeline.run.active brief: 'The number of pipeline runs currently executing.' instrument: updowncounter unit: "{run}" From 55414eee861b1ac2690b6cd1679f82739c980304 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 21:38:36 +0100 Subject: [PATCH 23/31] [cicd] rename metric cicd.queue.latency to cicd.pipeline.run.time_in_queue --- .chloggen/1600-cicd-metrics.yaml | 2 +- docs/cicd/cicd-metrics.md | 8 ++++---- model/cicd/metrics.yaml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml index 628731e5fd..cc3f17ccb0 100644 --- a/.chloggen/1600-cicd-metrics.yaml +++ b/.chloggen/1600-cicd-metrics.yaml @@ -22,5 +22,5 @@ issues: [1600] subtext: | Makes the following changes: - - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.queue.latency`, `cicd.queue.length`, `cicd.worker.count`, `cicd.errors`. + - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.queue.length`, `cicd.worker.count`, `cicd.errors`. - The CICD attributes `cicd.pipeline.result`, `cicd.worker.state` and `cicd.worker.class` have been added to the registry. diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index c448828498..99de75c519 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -13,7 +13,7 @@ linkTitle: CICD metrics - [CICD Metrics](#cicd-metrics) - [Metric: `cicd.pipeline.run.duration`](#metric-cicdpipelinerunduration) - [Metric: `cicd.pipeline.run.active`](#metric-cicdpipelinerunactive) - - [Metric: `cicd.queue.latency`](#metric-cicdqueuelatency) + - [Metric: `cicd.pipeline.run.time_in_queue`](#metric-cicdpipelineruntime_in_queue) - [Metric: `cicd.queue.length`](#metric-cicdqueuelength) - [Metric: `cicd.worker.count`](#metric-cicdworkercount) - [Metric: `cicd.errors`](#metric-cicderrors) @@ -128,11 +128,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `cicd.queue.latency` +### Metric: `cicd.pipeline.run.time_in_queue` This metric is [recommended][MetricRecommended]. - + @@ -141,7 +141,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `cicd.queue.latency` | Histogram | `s` | The duration a pipeline run takes from being triggered to the start of execution. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.pipeline.run.time_in_queue` | Histogram | `s` | The duration a pipeline run takes from being triggered to the start of execution. | ![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/cicd/metrics.yaml b/model/cicd/metrics.yaml index abca3f6ac2..3bb76531a4 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -24,9 +24,9 @@ groups: attributes: - ref: cicd.pipeline.name requirement_level: required - - id: metric.cicd.queue.latency + - id: metric.cicd.pipeline.run.time_in_queue type: metric - metric_name: cicd.queue.latency + metric_name: cicd.pipeline.run.time_in_queue brief: 'The duration a pipeline run takes from being triggered to the start of execution.' instrument: histogram unit: "s" From fc48dd2337c83bbe02b0dcacd0202d97efe80ee1 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 21:53:49 +0100 Subject: [PATCH 24/31] [cicd] rename metric cicd.errors to cicd.system.errors --- .chloggen/1600-cicd-metrics.yaml | 2 +- docs/cicd/cicd-metrics.md | 10 ++++++---- model/cicd/metrics.yaml | 7 ++++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml index cc3f17ccb0..26aee44197 100644 --- a/.chloggen/1600-cicd-metrics.yaml +++ b/.chloggen/1600-cicd-metrics.yaml @@ -22,5 +22,5 @@ issues: [1600] subtext: | Makes the following changes: - - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.queue.length`, `cicd.worker.count`, `cicd.errors`. + - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.queue.length`, `cicd.worker.count`, `cicd.system.errors`. - The CICD attributes `cicd.pipeline.result`, `cicd.worker.state` and `cicd.worker.class` have been added to the registry. diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 99de75c519..80dcdbf755 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -16,7 +16,7 @@ linkTitle: CICD metrics - [Metric: `cicd.pipeline.run.time_in_queue`](#metric-cicdpipelineruntime_in_queue) - [Metric: `cicd.queue.length`](#metric-cicdqueuelength) - [Metric: `cicd.worker.count`](#metric-cicdworkercount) - - [Metric: `cicd.errors`](#metric-cicderrors) + - [Metric: `cicd.system.errors`](#metric-cicdsystemerrors) - [VCS Metrics](#vcs-metrics) - [Metric: `vcs.change.count`](#metric-vcschangecount) - [Metric: `vcs.change.duration`](#metric-vcschangeduration) @@ -223,11 +223,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `cicd.errors` +### Metric: `cicd.system.errors` This metric is [recommended][MetricRecommended]. - + @@ -236,7 +236,9 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `cicd.errors` | Counter | `{error}` | The number of errors in the controller of the CICD system. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.system.errors` | Counter | `{error}` | The number of errors in a component of the CICD system (eg. controller, scheduler, agent). [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + +**[1]:** Errors in pipeline run execution are explicitly excluded. Ie a test failure is not counted in this metric. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index 3bb76531a4..9748cf4b49 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -56,10 +56,11 @@ groups: requirement_level: required - ref: cicd.worker.state requirement_level: required - - id: metric.cicd.errors + - id: metric.cicd.system.errors type: metric - metric_name: cicd.errors - brief: 'The number of errors in the controller of the CICD system.' + metric_name: cicd.system.errors + brief: 'The number of errors in a component of the CICD system (eg. controller, scheduler, agent).' + note: 'Errors in pipeline run execution are explicitly excluded. Ie a test failure is not counted in this metric.' instrument: counter unit: "{error}" stability: experimental From 0be8d4d34f4a039e8e582dede6f6d78aa8a8b79b Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 21:59:37 +0100 Subject: [PATCH 25/31] [cicd] Add metric cicd.pipeline.run.errors --- .chloggen/1600-cicd-metrics.yaml | 2 +- docs/cicd/cicd-metrics.md | 54 ++++++++++++++++++++++++++++++++ model/cicd/metrics.yaml | 12 +++++++ 3 files changed, 67 insertions(+), 1 deletion(-) diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml index 26aee44197..a05e5cc915 100644 --- a/.chloggen/1600-cicd-metrics.yaml +++ b/.chloggen/1600-cicd-metrics.yaml @@ -22,5 +22,5 @@ issues: [1600] subtext: | Makes the following changes: - - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.queue.length`, `cicd.worker.count`, `cicd.system.errors`. + - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.queue.length`, `cicd.worker.count`, `cicd.pipeline.run.errors`, `cicd.system.errors`. - The CICD attributes `cicd.pipeline.result`, `cicd.worker.state` and `cicd.worker.class` have been added to the registry. diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 80dcdbf755..1a6a04750d 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -16,6 +16,7 @@ linkTitle: CICD metrics - [Metric: `cicd.pipeline.run.time_in_queue`](#metric-cicdpipelineruntime_in_queue) - [Metric: `cicd.queue.length`](#metric-cicdqueuelength) - [Metric: `cicd.worker.count`](#metric-cicdworkercount) + - [Metric: `cicd.pipeline.run.errors`](#metric-cicdpipelinerunerrors) - [Metric: `cicd.system.errors`](#metric-cicdsystemerrors) - [VCS Metrics](#vcs-metrics) - [Metric: `vcs.change.count`](#metric-vcschangecount) @@ -223,6 +224,59 @@ This metric is [recommended][MetricRecommended]. +### Metric: `cicd.pipeline.run.errors` + +This metric is [recommended][MetricRecommended]. + + + + + + + + +| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| -------- | --------------- | ----------- | -------------- | --------- | +| `cicd.pipeline.run.errors` | Counter | `{error}` | The number of errors encountered in pipeline runs (eg. compile, test failures). | ![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 | +|---|---|---|---|---|---| +| [`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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-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` | `Required` | ![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. + +--- + +`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) | + + + + + + ### Metric: `cicd.system.errors` This metric is [recommended][MetricRecommended]. diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index 9748cf4b49..6de0e6d5f2 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -56,6 +56,18 @@ groups: requirement_level: required - ref: cicd.worker.state requirement_level: required + - id: metric.cicd.pipeline.run.errors + type: metric + metric_name: cicd.pipeline.run.errors + brief: 'The number of errors encountered in pipeline runs (eg. compile, test failures).' + instrument: counter + unit: "{error}" + stability: experimental + attributes: + - ref: cicd.pipeline.name + requirement_level: required + - ref: error.type + requirement_level: required - id: metric.cicd.system.errors type: metric metric_name: cicd.system.errors From 996e8096857d163d8981dae887af41641bafe7be Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 22:07:30 +0100 Subject: [PATCH 26/31] [cicd] added attribute cicd.system.component, added it to cicd.system.errors metric --- .chloggen/1600-cicd-metrics.yaml | 2 +- docs/attributes-registry/cicd.md | 1 + docs/cicd/cicd-metrics.md | 1 + model/cicd/metrics.yaml | 2 ++ model/cicd/registry.yaml | 10 ++++++++++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml index a05e5cc915..9fc7da23ff 100644 --- a/.chloggen/1600-cicd-metrics.yaml +++ b/.chloggen/1600-cicd-metrics.yaml @@ -23,4 +23,4 @@ subtext: | Makes the following changes: - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.queue.length`, `cicd.worker.count`, `cicd.pipeline.run.errors`, `cicd.system.errors`. - - The CICD attributes `cicd.pipeline.result`, `cicd.worker.state` and `cicd.worker.class` have been added to the registry. + - The CICD attributes `cicd.pipeline.result`, `cicd.system.component`, `cicd.worker.state` and `cicd.worker.class` have been added to the registry. diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index 3f5d5f4cd7..e26513cb1b 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -19,6 +19,7 @@ This group describes attributes specific to pipelines within a Continuous Integr | `cicd.pipeline.task.run.id` | string | The unique identifier of a task run within a pipeline. | `12097` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.run.url.full` | 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/job/26920038674?pr=1075` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.type` | string | The type of the task within a pipeline. | `build`; `test`; `deploy` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.system.component` | string | The name of a component of the CICD system. | `controller`; `scheduler`; `agent` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.worker.class` | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.worker.state` | string | The state of a CICD worker / agent. | `idle`; `busy`; `down` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 1a6a04750d..5d05436777 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -296,6 +296,7 @@ This metric is [recommended][MetricRecommended]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| +| [`cicd.system.component`](/docs/attributes-registry/cicd.md) | string | The name of a component of the CICD system. | `controller`; `scheduler`; `agent` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-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` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1] `error.type`:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality. diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index 6de0e6d5f2..4343b9f4b4 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -77,5 +77,7 @@ groups: unit: "{error}" stability: experimental attributes: + - ref: cicd.system.component + requirement_level: required - ref: error.type requirement_level: required diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index 3d51cb6c36..d8cee5f230 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -150,3 +150,13 @@ groups: brief: > The state of a CICD worker / agent. examples: ["idle", "busy", "down"] + - id: cicd.system.component + type: string + stability: experimental + brief: The name of a component of the CICD system. + examples: + [ + "controller", + "scheduler", + "agent", + ] From b3326385c794f476f1c02036b1486cf6049a4c47 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 22:13:24 +0100 Subject: [PATCH 27/31] [cicd] remove cicd.worker.class attribute --- .chloggen/1600-cicd-metrics.yaml | 2 +- docs/attributes-registry/cicd.md | 11 ----------- docs/cicd/cicd-metrics.md | 11 ----------- model/cicd/metrics.yaml | 2 -- model/cicd/registry.yaml | 19 ------------------- 5 files changed, 1 insertion(+), 44 deletions(-) diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml index 9fc7da23ff..3428c41831 100644 --- a/.chloggen/1600-cicd-metrics.yaml +++ b/.chloggen/1600-cicd-metrics.yaml @@ -23,4 +23,4 @@ subtext: | Makes the following changes: - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.queue.length`, `cicd.worker.count`, `cicd.pipeline.run.errors`, `cicd.system.errors`. - - The CICD attributes `cicd.pipeline.result`, `cicd.system.component`, `cicd.worker.state` and `cicd.worker.class` have been added to the registry. + - The CICD attributes `cicd.pipeline.result`, `cicd.system.component`, `cicd.worker.state` have been added to the registry. diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index e26513cb1b..1944ebd5a4 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -20,7 +20,6 @@ This group describes attributes specific to pipelines within a Continuous Integr | `cicd.pipeline.task.run.url.full` | 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/job/26920038674?pr=1075` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.pipeline.task.type` | string | The type of the task within a pipeline. | `build`; `test`; `deploy` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.system.component` | string | The name of a component of the CICD system. | `controller`; `scheduler`; `agent` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `cicd.worker.class` | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `cicd.worker.state` | string | The state of a CICD worker / agent. | `idle`; `busy`; `down` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- @@ -48,16 +47,6 @@ This group describes attributes specific to pipelines within a Continuous Integr --- -`cicd.worker.class` 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 | -|---|---|---| -| `container` | A single container. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `pod` | One or more containers deployed together. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `vm` | A virtual machine or baremetal host. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - ---- - `cicd.worker.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 5d05436777..6e7a162bb7 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -194,21 +194,10 @@ This metric is [recommended][MetricRecommended]. | Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| -| [`cicd.worker.class`](/docs/attributes-registry/cicd.md) | string | The type of worker / agent used by the CICD system. | `vm`; `pod` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | [`cicd.worker.state`](/docs/attributes-registry/cicd.md) | string | The state of a CICD worker / agent. | `idle`; `busy`; `down` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | --- -`cicd.worker.class` 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 | -|---|---|---| -| `container` | A single container. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `pod` | One or more containers deployed together. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `vm` | A virtual machine or baremetal host. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | - ---- - `cicd.worker.state` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index 4343b9f4b4..9a636fd87a 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -52,8 +52,6 @@ groups: unit: "{count}" stability: experimental attributes: - - ref: cicd.worker.class - requirement_level: required - ref: cicd.worker.state requirement_level: required - id: metric.cicd.pipeline.run.errors diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index d8cee5f230..dd872fe9d5 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -109,25 +109,6 @@ groups: brief: > The result of a pipeline run. examples: ["success", "failure", "timeout", "skipped"] - - id: cicd.worker.class - type: - members: - - id: vm - value: vm - brief: "A virtual machine or baremetal host." - stability: experimental - - id: container - value: container - brief: "A single container." - stability: experimental - - id: pod - value: pod - brief: "One or more containers deployed together." - stability: experimental - stability: experimental - brief: > - The type of worker / agent used by the CICD system. - examples: ["vm", "pod"] - id: cicd.worker.state type: members: From cf67fd2d746574a599e7c1c86fbf7c6b7fecc696 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 22:18:15 +0100 Subject: [PATCH 28/31] [cicd] adapt brief of cicd.worker.count metric --- docs/cicd/cicd-metrics.md | 2 +- model/cicd/metrics.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 6e7a162bb7..1b91c2a16d 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -190,7 +190,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `cicd.worker.count` | UpDownCounter | `{count}` | The number of workers on the CICD system by class and status. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.worker.count` | UpDownCounter | `{count}` | The number of workers on the CICD system by 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 | |---|---|---|---|---|---| diff --git a/model/cicd/metrics.yaml b/model/cicd/metrics.yaml index 9a636fd87a..29586ee85e 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -47,7 +47,7 @@ groups: - id: metric.cicd.worker.count type: metric metric_name: cicd.worker.count - brief: 'The number of workers on the CICD system by class and status.' + brief: 'The number of workers on the CICD system by state.' instrument: updowncounter unit: "{count}" stability: experimental From 702ca16e7208f66586f8e3fc9e4c36537acc30ce Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 22:20:34 +0100 Subject: [PATCH 29/31] [cicd] rename metric cicd.queue.length to cicd.pipeline.run.queued --- .chloggen/1600-cicd-metrics.yaml | 2 +- docs/cicd/cicd-metrics.md | 8 ++++---- model/cicd/metrics.yaml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml index 3428c41831..4571d4ce1d 100644 --- a/.chloggen/1600-cicd-metrics.yaml +++ b/.chloggen/1600-cicd-metrics.yaml @@ -22,5 +22,5 @@ issues: [1600] subtext: | Makes the following changes: - - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.queue.length`, `cicd.worker.count`, `cicd.pipeline.run.errors`, `cicd.system.errors`. + - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.pipeline.run.queued`, `cicd.worker.count`, `cicd.pipeline.run.errors`, `cicd.system.errors`. - The CICD attributes `cicd.pipeline.result`, `cicd.system.component`, `cicd.worker.state` have been added to the registry. diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 1b91c2a16d..74c67bfdb2 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -14,7 +14,7 @@ linkTitle: CICD metrics - [Metric: `cicd.pipeline.run.duration`](#metric-cicdpipelinerunduration) - [Metric: `cicd.pipeline.run.active`](#metric-cicdpipelinerunactive) - [Metric: `cicd.pipeline.run.time_in_queue`](#metric-cicdpipelineruntime_in_queue) - - [Metric: `cicd.queue.length`](#metric-cicdqueuelength) + - [Metric: `cicd.pipeline.run.queued`](#metric-cicdpipelinerunqueued) - [Metric: `cicd.worker.count`](#metric-cicdworkercount) - [Metric: `cicd.pipeline.run.errors`](#metric-cicdpipelinerunerrors) - [Metric: `cicd.system.errors`](#metric-cicdsystemerrors) @@ -153,11 +153,11 @@ This metric is [recommended][MetricRecommended]. -### Metric: `cicd.queue.length` +### Metric: `cicd.pipeline.run.queued` This metric is [recommended][MetricRecommended]. - + @@ -166,7 +166,7 @@ This metric is [recommended][MetricRecommended]. | Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | -| `cicd.queue.length` | UpDownCounter | `{run}` | The number of pipeline runs waiting for their start of execution. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cicd.pipeline.run.queued` | UpDownCounter | `{run}` | The number of pipeline runs waiting for their start of execution. | ![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/cicd/metrics.yaml b/model/cicd/metrics.yaml index 29586ee85e..565e1fa99a 100644 --- a/model/cicd/metrics.yaml +++ b/model/cicd/metrics.yaml @@ -34,9 +34,9 @@ groups: attributes: - ref: cicd.pipeline.name requirement_level: recommended - - id: metric.cicd.queue.length + - id: metric.cicd.pipeline.run.queued type: metric - metric_name: cicd.queue.length + metric_name: cicd.pipeline.run.queued brief: 'The number of pipeline runs waiting for their start of execution.' instrument: updowncounter unit: "{run}" From b1131666b02dc7c8c5399d5ec221d25c78ab4fa0 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 22:48:03 +0100 Subject: [PATCH 30/31] [cicd] fix yamllint --- .chloggen/1600-cicd-metrics.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.chloggen/1600-cicd-metrics.yaml b/.chloggen/1600-cicd-metrics.yaml index 4571d4ce1d..434417778f 100644 --- a/.chloggen/1600-cicd-metrics.yaml +++ b/.chloggen/1600-cicd-metrics.yaml @@ -22,5 +22,6 @@ issues: [1600] subtext: | Makes the following changes: - - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.pipeline.run.queued`, `cicd.worker.count`, `cicd.pipeline.run.errors`, `cicd.system.errors`. + - Add metrics `cicd.pipeline.run.duration`, `cicd.pipeline.run.active`, `cicd.pipeline.run.time_in_queue`, `cicd.pipeline.run.queued`, `cicd.worker.count`, + `cicd.pipeline.run.errors` and `cicd.system.errors`. - The CICD attributes `cicd.pipeline.result`, `cicd.system.component`, `cicd.worker.state` have been added to the registry. From adf29b48f1fdbfd30aa0d77429c2e0a8ae6f3c35 Mon Sep 17 00:00:00 2001 From: Christophe Kamphaus Date: Thu, 9 Jan 2025 22:51:02 +0100 Subject: [PATCH 31/31] [cicd] rename result value cancel to cancellation This ensures that all result values are nouns. --- docs/attributes-registry/cicd.md | 2 +- docs/cicd/cicd-metrics.md | 2 +- model/cicd/registry.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/attributes-registry/cicd.md b/docs/attributes-registry/cicd.md index 1944ebd5a4..8daa832336 100644 --- a/docs/attributes-registry/cicd.md +++ b/docs/attributes-registry/cicd.md @@ -28,7 +28,7 @@ This group describes attributes specific to pipelines within a Continuous Integr | Value | Description | Stability | |---|---|---| -| `cancel` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cancellation` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Experimental](https://img.shields.io/badge/-experimental-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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `skip` | The pipeline run was skipped, eg. due to a precondition not being met. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/docs/cicd/cicd-metrics.md b/docs/cicd/cicd-metrics.md index 74c67bfdb2..e7428888fd 100644 --- a/docs/cicd/cicd-metrics.md +++ b/docs/cicd/cicd-metrics.md @@ -85,7 +85,7 @@ it's RECOMMENDED to: | Value | Description | Stability | |---|---|---| -| `cancel` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `cancellation` | The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error` | The pipeline run failed due to an error in the CICD system, eg. due to the worker being killed. | ![Experimental](https://img.shields.io/badge/-experimental-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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `skip` | The pipeline run was skipped, eg. due to a precondition not being met. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | diff --git a/model/cicd/registry.yaml b/model/cicd/registry.yaml index dd872fe9d5..244cbf57cc 100644 --- a/model/cicd/registry.yaml +++ b/model/cicd/registry.yaml @@ -97,8 +97,8 @@ groups: value: timeout brief: "A timeout caused the pipeline run to be interrupted." stability: experimental - - id: cancel - value: cancel + - id: cancellation + value: cancellation brief: "The pipeline run was cancelled, eg. by a user manually cancelling the pipeline run." stability: experimental - id: skip