-
Notifications
You must be signed in to change notification settings - Fork 192
/
Copy pathmetrics.yaml
178 lines (178 loc) · 6.59 KB
/
metrics.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
groups:
- id: metric.vcs.change.count
type: metric
metric_name: vcs.change.count
brief: 'The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged)'
instrument: updowncounter
unit: "{change}"
stability: development
attributes:
- ref: vcs.change.state
requirement_level: required
- ref: vcs.repository.url.full
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended
- id: metric.vcs.change.duration
type: metric
metric_name: vcs.change.duration
brief: 'The time duration a change (pull request/merge request/changelist) has been in a given state.'
instrument: gauge
unit: "s"
stability: development
attributes:
- ref: vcs.repository.url.full
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended
- ref: vcs.ref.head.name
requirement_level: required
- ref: vcs.change.state
requirement_level: required
- id: metric.vcs.change.time_to_approval
type: metric
metric_name: vcs.change.time_to_approval
brief: 'The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval.'
instrument: gauge
unit: "s"
stability: development
attributes:
- ref: vcs.repository.url.full
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended
- ref: vcs.ref.head.name
requirement_level: required
- ref: vcs.ref.head.revision
requirement_level: opt_in
- ref: vcs.ref.base.name
requirement_level: recommended
- ref: vcs.ref.base.revision
requirement_level: opt_in
- id: metric.vcs.change.time_to_merge
type: metric
metric_name: vcs.change.time_to_merge
brief: 'The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref.'
instrument: gauge
unit: "s"
stability: development
attributes:
- ref: vcs.repository.url.full
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended
- ref: vcs.ref.head.name
requirement_level: required
- ref: vcs.ref.head.revision
requirement_level: opt_in
- ref: vcs.ref.base.name
requirement_level: recommended
- ref: vcs.ref.base.revision
requirement_level: opt_in
- id: metric.vcs.repository.count
type: metric
metric_name: vcs.repository.count
brief: 'The number of repositories in an organization.'
instrument: updowncounter
unit: "{repository}"
stability: development
attributes: []
- id: metric.vcs.ref.count
type: metric
metric_name: vcs.ref.count
brief: 'The number of refs of type branch or tag in a repository.'
instrument: updowncounter
unit: "{ref}"
stability: development
attributes:
- ref: vcs.repository.url.full
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended
- ref: vcs.ref.type
requirement_level: required
- id: metric.vcs.ref.lines_delta
type: metric
metric_name: vcs.ref.lines_delta
brief: 'The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute.'
note: |
This metric should be reported for each `vcs.line_change.type` value. For example if a ref added 3 lines and removed 2 lines,
instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers).
If number of lines added/removed should be calculated from the start of time, then `vcs.ref.base.name` SHOULD be set to an empty string.
instrument: gauge
unit: "{line}"
stability: development
attributes:
- ref: vcs.change.id
requirement_level:
conditionally_required: if a change is associate with the ref.
- ref: vcs.repository.url.full
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended
- ref: vcs.ref.head.name
requirement_level: required
- ref: vcs.ref.head.type
requirement_level: required
- ref: vcs.ref.base.name
requirement_level: required
- ref: vcs.ref.base.type
requirement_level: required
- ref: vcs.line_change.type
requirement_level: required
- id: metric.vcs.ref.revisions_delta
type: metric
metric_name: vcs.ref.revisions_delta
brief: 'The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute'
note: |
This metric should be reported for each `vcs.revision_delta.direction` value. For example if branch `a` is 3 commits behind and 2 commits ahead of `trunk`,
instrumentation SHOULD report two measurements: 3 and 2 (both positive numbers) and `vcs.ref.base.name` is set to `trunk`.
instrument: gauge
unit: "{revision}"
stability: development
attributes:
- ref: vcs.change.id
requirement_level:
conditionally_required: if a change is associate with the ref.
- ref: vcs.repository.url.full
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended
- ref: vcs.ref.head.name
requirement_level: required
- ref: vcs.ref.head.type
requirement_level: required
- ref: vcs.ref.base.name
requirement_level: required
- ref: vcs.ref.base.type
requirement_level: required
- ref: vcs.revision_delta.direction
requirement_level: required
- id: metric.vcs.ref.time
type: metric
metric_name: vcs.ref.time
brief: 'Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch`'
instrument: gauge
unit: "s"
stability: development
attributes:
- ref: vcs.repository.url.full
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended
- ref: vcs.ref.head.name
requirement_level: required
- ref: vcs.ref.head.type
requirement_level: required
- id: metric.vcs.contributor.count
type: metric
metric_name: vcs.contributor.count
brief: 'The number of unique contributors to a repository'
instrument: gauge
unit: "{contributor}"
stability: development
attributes:
- ref: vcs.repository.url.full
requirement_level: required
- ref: vcs.repository.name
requirement_level: recommended