You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/autometrics_v1.0.0.md
+31-2Lines changed: 31 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,11 +184,12 @@ function.
184
184
185
185
## Labels
186
186
187
-
The following is a list of labels and their intended use. See the
188
-
[metrics](#metrics) section for which labels are valid on each metric.
187
+
The following is a list of labels and their intended use.
189
188
190
189
### `autometrics.version`
191
190
191
+
> Used with metrics: [`build_info`](#build_info)
192
+
192
193
The version of the specification that the library targets. This version MUST
193
194
contain the full version without the `v` prefix.
194
195
@@ -199,11 +200,15 @@ For the current specification this SHOULD be `1.0.0`.
199
200
200
201
### `branch`
201
202
203
+
> Used with metrics: [`build_info`](#build_info)
204
+
202
205
The Git branch of the user's project. If this information is not available, this
203
206
label MAY be absent or empty (`""`).
204
207
205
208
### `caller.function`
206
209
210
+
> Used with metrics: [`function.calls`](#functioncalls)
211
+
207
212
The name of the `function` that invoked the given function. If the caller is
208
213
not known, this label MUST be absent or empty (`""`).
209
214
@@ -216,23 +221,31 @@ information has a non-negligible performance overhead.
216
221
217
222
### `caller.module`
218
223
224
+
> Used with metrics: [`function.calls`](#functioncalls)
225
+
219
226
The `module` of the function that invoked the given function. If the caller is
220
227
not known, this label MUST be absent or empty (`""`).
221
228
222
229
See [`caller.function`](#callerfunction)
223
230
224
231
### `commit`
225
232
233
+
> Used with metrics: [`build_info`](#build_info)
234
+
226
235
The Git commit hash identifying the snapshot of the user's project. The library
227
236
MAY truncate the commit hash to its short representation. If this information is
228
237
not available, this label MUST be absent or empty (`""`).
229
238
230
239
### `function`
231
240
241
+
> Used with metrics: [`function.calls`](#functioncalls), [`function.calls.duration`](#functioncallsduration), [`function.calls.concurrent`](#functioncallsconcurrent)
242
+
232
243
The name of the function or method, exactly as it appears in the source code.
233
244
234
245
### `module`
235
246
247
+
> Used with metrics: [`function.calls`](#functioncalls), [`function.calls.duration`](#functioncallsduration), [`function.calls.concurrent`](#functioncallsconcurrent)
248
+
236
249
The fully-qualified module or file path of the `function`.
237
250
238
251
The combination of the `function` and `module` labels MUST be sufficient to
@@ -242,6 +255,8 @@ The exact contents of this label value are assumed to be language-specific.
242
255
243
256
### `objective.name`
244
257
258
+
> Used with metrics: [`function.calls`](#functioncalls), [`function.calls.duration`](#functioncallsduration)
259
+
245
260
If a function has an [SLO](#service-level-objectives-slos) attached, this label
246
261
MUST contain the user-specified name of the objective. If there is no SLO
247
262
attached, this label MUST be absent or empty (`""`).
@@ -252,6 +267,8 @@ The library SHOULD warn users when an objective name does not start with an alph
252
267
253
268
### `objective.percentile`
254
269
270
+
> Used with metrics: [`function.calls`](#functioncalls), [`function.calls.duration`](#functioncallsduration)
271
+
255
272
If a function has an [SLO](#service-level-objectives-slos) attached, this label
256
273
MUST specifies the percentage of requests that should return the `result="ok"`
257
274
OR the percentage of requests that should meet the specified
@@ -269,6 +286,8 @@ rules for the custom percentiles.
269
286
270
287
### `objective.latency_threshold`
271
288
289
+
> Used with metrics: [`function.calls.duration`](#functioncallsduration)
290
+
272
291
If a function has an [SLO](#service-level-objectives-slos) attached, this MUST
273
292
specify the maximum duration of function calls that are considered meeting
274
293
the objective.
@@ -284,6 +303,8 @@ metric.
284
303
285
304
### `result`
286
305
306
+
> Used with metrics: [`function.calls`](#functioncalls)
307
+
287
308
Whether the function executed successfully or errored. An error MAY either mean
288
309
that the function returned an error or that it threw an exception.
289
310
@@ -295,6 +316,8 @@ example to allow users to treat client-side errors as `"ok"`.
295
316
296
317
### `service.name`
297
318
319
+
> Used with metrics: [`build_info`](#build_info), [`function.calls`](#functioncalls), [`function.calls.duration`](#functioncallsduration), [`function.calls.concurrent`](#functioncallsconcurrent)
320
+
298
321
The logical name of a service. This matches the
299
322
[OpenTelemetry Service specification](https://github.com/open-telemetry/semantic-conventions/tree/main/specification/resource/semantic_conventions#service).
300
323
@@ -311,12 +334,16 @@ something like a package name or the binary name.
311
334
312
335
### `version`
313
336
337
+
> Used with metrics: [`build_info`](#build_info)
338
+
314
339
The version of the user's project, ideally using
315
340
[Semantic Versioning](https://semver.org/). It SHOULD only contain the version
316
341
number and SHOULD NOT start with a `v`.
317
342
318
343
### `repository.url`
319
344
345
+
> Used with metrics: [`build_info`](#build_info)
346
+
320
347
A URL to the user's project git or other scm repository. This SHOULD be a URL
321
348
that makes sense for the repository type. For example, for a git repository, it
322
349
MAY be a HTTP URL or a SSH URL.
@@ -328,6 +355,8 @@ by itself, but the user MUST be able to opt-out of this behavior.
328
355
329
356
### `repository.provider`
330
357
358
+
> Used with metrics: [`build_info`](#build_info)
359
+
331
360
A hint to which provider is being used to host the repository. A consumer can
332
361
use this to provider deeper integration. The value MUST be a freeform string to
0 commit comments