Skip to content

Commit 190961f

Browse files
kamphausjoaopgrassilmolkova
authored
Add guidance for CICD per pipeline run metrics (#2618)
Co-authored-by: Joao Grassi <[email protected]> Co-authored-by: Liudmila Molkova <[email protected]>
1 parent 7782509 commit 190961f

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: cicd
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Add guidance on per pipeline run metrics
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [1184]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/cicd/cicd-metrics.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ linkTitle: Metrics
99
<!-- toc -->
1010

1111
- [CICD Metrics](#cicd-metrics)
12+
- [Guidance on per pipeline run metrics](#guidance-on-per-pipeline-run-metrics)
1213
- [Metric: `cicd.pipeline.run.duration`](#metric-cicdpipelinerunduration)
1314
- [Metric: `cicd.pipeline.run.active`](#metric-cicdpipelinerunactive)
1415
- [Metric: `cicd.worker.count`](#metric-cicdworkercount)
@@ -35,6 +36,24 @@ The conventions described in this section are specific to Continuous Integration
3536
**Disclaimer:** These are initial CICD metrics and attributes
3637
but more may be added in the future.
3738

39+
### Guidance on per pipeline run metrics
40+
41+
It might be useful to gather metrics specific to each pipeline run.<br>
42+
Examples of such metrics include:
43+
44+
* host metrics like cpu, memory, disk of the worker on which a pipeline run executes
45+
* container metrics like cpu, memory requests and limits
46+
* runtime metrics of any processes executed as part of the pipeline run like JVM metrics
47+
48+
These metrics could be used to correlate build failures with environment issues like overload or out-of-memory.
49+
They could also be used in pipeline-level aggregations to inform adjustements of allocated worker resources.
50+
51+
When reporting host, container, runtime, and other metrics in CI/CD pipelines, instrumentation authors and application developers SHOULD use applicable [CICD and VCS resource conventions][cicdres] and MAY also associate all or specific metrics with `cicd.pipeline.run` to correlate them with run information.
52+
53+
The [`cicd.pipeline.run`](/docs/resource/cicd.md#cicd-pipeline-run) entity identifies a pipeline run. Associating it with metrics inherently causes high cardinality and may increase costs with some metric storage backends. Thus, `cicd.pipeline.run` entity MUST be opt-in.
54+
55+
[cicdres]: /docs/resource/cicd.md (CICD and VCS resource conventions)
56+
3857
### Metric: `cicd.pipeline.run.duration`
3958

4059
This metric is [recommended][MetricRecommended].

0 commit comments

Comments
 (0)