Semantic conventions for CICD spans

Status: Development

CICD Spans

The conventions described in this section are specific to Continuous Integration / Continuous Deployment (CICD) systems.

Any resources of the CICD and VCS resource conventions that apply SHOULD be used.

Pipeline run

Status: Development

This span describes a CICD pipeline run.

For all pipeline runs, a span with kind SERVER SHOULD be created corresponding to the execution of the pipeline run.

Span name MUST follow the overall guidelines for span names.

The span name SHOULD be {action} {pipeline} if there is a (low-cardinality) pipeline name available. If the pipeline name is not available or is likely to have high cardinality, then the span name SHOULD be {action}.

The {action} SHOULD be the cicd.pipeline.action.name.

The {pipeline} SHOULD be the cicd.pipeline.name.

Span kind SHOULD be SERVER.

Span status SHOULD follow the Recording Errors document.

AttributeTypeDescriptionExamplesRequirement LevelStability
cicd.pipeline.resultstringThe result of a pipeline run.success; failure; timeout; skippedRequiredDevelopment
error.typestringDescribes a class of error the operation ended with. [1]timeout; java.net.UnknownHostException; server_certificate_invalid; 500Conditionally Required if the pipeline result is failure or errorStable
cicd.pipeline.action.namestringThe kind of action a pipeline run is performing.BUILD; RUN; SYNCOpt-InDevelopment

[1] error.type: The error.type SHOULD be predictable, and SHOULD have low cardinality.

When error.type is set to a type (e.g., an exception type), its canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of error.type within one instrumentation library SHOULD be low. Telemetry consumers that aggregate data from multiple instrumentation libraries and applications should be prepared for error.type to have high cardinality at query time when no additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set error.type.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it’s RECOMMENDED to:

  • Use a domain-specific attribute
  • Set error.type to capture all errors, regardless of whether they are defined within the domain-specific set or not.

cicd.pipeline.action.name has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
BUILDThe pipeline run is executing a build.Development
RUNThe pipeline run is executing.Development
SYNCThe pipeline run is executing a sync.Development

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.

ValueDescriptionStability
cancellationThe pipeline run was cancelled, eg. by a user manually cancelling the pipeline run.Development
errorThe pipeline run failed due to an error in the CICD system, eg. due to the worker being killed.Development
failureThe pipeline run did not finish successfully, eg. due to a compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the pipeline run.Development
skipThe pipeline run was skipped, eg. due to a precondition not being met.Development
successThe pipeline run finished successfully.Development
timeoutA timeout caused the pipeline run to be interrupted.Development

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.

ValueDescriptionStability
_OTHERA fallback error value to be used when the instrumentation doesn’t define a custom value.Stable

Pipeline task run

Status: Development

This span describes task execution in a pipeline run.

Span kind SHOULD be INTERNAL.

Span status SHOULD follow the Recording Errors document.

AttributeTypeDescriptionExamplesRequirement LevelStability
cicd.pipeline.task.namestringThe human readable name of a task within a pipeline. Task here most closely aligns with a computing process in a pipeline. Other terms for tasks include commands, steps, and procedures.Run GoLang Linter; Go Build; go-test; deploy_binaryRequiredDevelopment
cicd.pipeline.task.run.idstringThe unique identifier of a task run within a pipeline.12097RequiredDevelopment
cicd.pipeline.task.run.resultstringThe result of a task run.success; failure; timeout; skippedRequiredDevelopment
cicd.pipeline.task.run.url.fullstringThe 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=1075RequiredDevelopment
error.typestringDescribes a class of error the operation ended with. [1]timeout; java.net.UnknownHostException; server_certificate_invalid; 500Conditionally Required if the task result is failure or errorStable

[1] error.type: The error.type SHOULD be predictable, and SHOULD have low cardinality.

When error.type is set to a type (e.g., an exception type), its canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of error.type within one instrumentation library SHOULD be low. Telemetry consumers that aggregate data from multiple instrumentation libraries and applications should be prepared for error.type to have high cardinality at query time when no additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set error.type.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it’s RECOMMENDED to:

  • Use a domain-specific attribute
  • Set error.type to capture all errors, regardless of whether they are defined within the domain-specific set or not.

The following attributes can be important for making sampling decisions and SHOULD be provided at span creation time (if provided at all):


cicd.pipeline.task.run.result has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
cancellationThe task run was cancelled, eg. by a user manually cancelling the task run.Development
errorThe task run failed due to an error in the CICD system, eg. due to the worker being killed.Development
failureThe task run did not finish successfully, eg. due to a compile error or a failing test. Such failures are usually detected by non-zero exit codes of the tools executed in the task run.Development
skipThe task run was skipped, eg. due to a precondition not being met.Development
successThe task run finished successfully.Development
timeoutA timeout caused the task run to be interrupted.Development

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.

ValueDescriptionStability
_OTHERA fallback error value to be used when the instrumentation doesn’t define a custom value.Stable