Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/clarification-cicd-task-run-id-uniqueness.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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: Clarify that `cicd.pipeline.task.run.id` must be unique within a pipeline run.

# 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: [3566]

# (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: This id may be used for correlating results of a task across several pipeline runs.
8 changes: 5 additions & 3 deletions docs/cicd/cicd-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,14 @@ This span describes task execution in a pipeline run.
| Key | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`cicd.pipeline.task.name`](/docs/registry/attributes/cicd.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | 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` |
| [`cicd.pipeline.task.run.id`](/docs/registry/attributes/cicd.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | The unique identifier of a task run within a pipeline. | `12097` |
| [`cicd.pipeline.task.run.id`](/docs/registry/attributes/cicd.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | The unique identifier of a task run within a pipeline. [1] | `12097` |
| [`cicd.pipeline.task.run.result`](/docs/registry/attributes/cicd.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | The result of a task run. | `success`; `failure`; `timeout`; `skipped` |
| [`cicd.pipeline.task.run.url.full`](/docs/registry/attributes/cicd.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run. | `https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075` |
| [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` if the task result is `failure` or `error` | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` |
| [`error.type`](/docs/registry/attributes/error.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` if the task result is `failure` or `error` | string | Describes a class of error the operation ended with. [2] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` |

**[1] `error.type`:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality.
**[1] `cicd.pipeline.task.run.id`:** For a given pipeline run and task the `cicd.pipeline.task.run.id` MUST be unique. For different pipeline runs of the same pipeline the task run id MAY remain the same and thus MAY allow correlating the `cicd.pipeline.task.run.result` of tasks across pipeline runs.

**[2] `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.
Expand Down
8 changes: 5 additions & 3 deletions docs/registry/attributes/cicd.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This group describes attributes specific to pipelines within a Continuous Integr
| <a id="cicd-pipeline-run-state" href="#cicd-pipeline-run-state">`cicd.pipeline.run.state`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The pipeline run goes through these states during its lifecycle. | `pending`; `executing`; `finalizing` |
| <a id="cicd-pipeline-run-url-full" href="#cicd-pipeline-run-url-full">`cicd.pipeline.run.url.full`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run. | `https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075` |
| <a id="cicd-pipeline-task-name" href="#cicd-pipeline-task-name">`cicd.pipeline.task.name`</a> | ![Development](https://img.shields.io/badge/-development-blue) | 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` |
| <a id="cicd-pipeline-task-run-id" href="#cicd-pipeline-task-run-id">`cicd.pipeline.task.run.id`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The unique identifier of a task run within a pipeline. | `12097` |
| <a id="cicd-pipeline-task-run-id" href="#cicd-pipeline-task-run-id">`cicd.pipeline.task.run.id`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The unique identifier of a task run within a pipeline. [1] | `12097` |
| <a id="cicd-pipeline-task-run-result" href="#cicd-pipeline-task-run-result">`cicd.pipeline.task.run.result`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The result of a task run. | `success`; `failure`; `timeout`; `skipped` |
| <a id="cicd-pipeline-task-run-url-full" href="#cicd-pipeline-task-run-url-full">`cicd.pipeline.task.run.url.full`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run. | `https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075` |
| <a id="cicd-pipeline-task-type" href="#cicd-pipeline-task-type">`cicd.pipeline.task.type`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The type of the task within a pipeline. | `build`; `test`; `deploy` |
Expand All @@ -28,6 +28,8 @@ This group describes attributes specific to pipelines within a Continuous Integr
| <a id="cicd-worker-state" href="#cicd-worker-state">`cicd.worker.state`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The state of a CICD worker / agent. | `idle`; `busy`; `down` |
| <a id="cicd-worker-url-full" href="#cicd-worker-url-full">`cicd.worker.url.full`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker. | `https://cicd.example.org/worker/abc123` |

**[1] `cicd.pipeline.task.run.id`:** For a given pipeline run and task the `cicd.pipeline.task.run.id` MUST be unique. For different pipeline runs of the same pipeline the task run id MAY remain the same and thus MAY allow correlating the `cicd.pipeline.task.run.result` of tasks across pipeline runs.

---

`cicd.pipeline.action.name` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Expand Down Expand Up @@ -90,8 +92,8 @@ This group describes attributes specific to pipelines within a Continuous Integr

| Value | Description | Stability |
| --- | --- | --- |
| `available` | The worker is not performing work for the CICD system. It is available to the CICD system to perform work on (online / idle). [1] | ![Development](https://img.shields.io/badge/-development-blue) |
| `available` | The worker is not performing work for the CICD system. It is available to the CICD system to perform work on (online / idle). [2] | ![Development](https://img.shields.io/badge/-development-blue) |
Comment thread
kamphaus marked this conversation as resolved.
| `busy` | The worker is performing work for the CICD system. | ![Development](https://img.shields.io/badge/-development-blue) |
| `offline` | The worker is not available to the CICD system (disconnected / down). | ![Development](https://img.shields.io/badge/-development-blue) |

**[1]:** Pipelines might have conditions on which workers they are able to run so not every worker might be available to every pipeline.
**[2]:** Pipelines might have conditions on which workers they are able to run so not every worker might be available to every pipeline.
4 changes: 4 additions & 0 deletions model/cicd/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ groups:
stability: development
brief: >
The unique identifier of a task run within a pipeline.
note: >
For a given pipeline run and task the `cicd.pipeline.task.run.id` MUST be unique.
For different pipeline runs of the same pipeline the task run id MAY remain the same and thus MAY allow correlating the `cicd.pipeline.task.run.result`
Comment on lines +79 to +80
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For a given pipeline run and task the `cicd.pipeline.task.run.id` MUST be unique.
For different pipeline runs of the same pipeline the task run id MAY remain the same and thus MAY allow correlating the `cicd.pipeline.task.run.result`
For a given pipeline run and task, the `cicd.pipeline.task.run.id` MUST be unique.
For different runs of the same pipeline, `cicd.pipeline.task.run.id` MAY remain the same and allow correlating with `cicd.pipeline.task.run.result`

I got confused with the multiple "pipeline and pipeline runs" so I rephrased it a bit. Also, I'm not entirely sure about the "correlation" part. Do we really need to include that? I don't particularly get any helpful insight from it from the small text here. Consider either removing it or maybe adding more explanation on how it can be correlated?

of tasks across pipeline runs.
examples: ["12097"]
- id: cicd.pipeline.task.run.url.full
type: string
Expand Down
Loading