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
/// An async instrument that records increasing values.
36
+
///
37
+
/// [`ObservableCounter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`ObservableCounter`]s for the same instrument.
/// An async instrument that records independent readings.
36
+
///
37
+
/// [`ObservableGauge`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`ObservableGauge`]s for the same instrument.
Copy file name to clipboardExpand all lines: opentelemetry/src/metrics/instruments/up_down_counter.rs
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ use std::sync::Arc;
5
5
usesuper::SyncInstrument;
6
6
7
7
/// An instrument that records increasing or decreasing values.
8
+
///
9
+
/// [`UpDownCounter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`UpDownCounter`]s for the same instrument.
/// An async instrument that records increasing or decreasing values.
39
+
///
40
+
/// [`ObservableUpDownCounter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`ObservableUpDownCounter`]s for the same instrument.
Copy file name to clipboardExpand all lines: opentelemetry/src/metrics/meter.rs
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -309,6 +309,8 @@ impl Meter {
309
309
}
310
310
311
311
/// creates an instrument builder for recording increasing values.
312
+
///
313
+
/// [`Counter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`Counter`]s for the same instrument.
312
314
pubfnu64_counter(
313
315
&self,
314
316
name:implInto<Cow<'static,str>>,
@@ -317,6 +319,8 @@ impl Meter {
317
319
}
318
320
319
321
/// creates an instrument builder for recording increasing values.
322
+
///
323
+
/// [`Counter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`Counter`]s for the same instrument.
320
324
pubfnf64_counter(
321
325
&self,
322
326
name:implInto<Cow<'static,str>>,
@@ -325,6 +329,8 @@ impl Meter {
325
329
}
326
330
327
331
/// creates an instrument builder for recording increasing values via callback.
332
+
///
333
+
/// [`ObservableCounter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`ObservableCounter`]s for the same instrument.
328
334
pubfnu64_observable_counter(
329
335
&self,
330
336
name:implInto<Cow<'static,str>>,
@@ -333,6 +339,8 @@ impl Meter {
333
339
}
334
340
335
341
/// creates an instrument builder for recording increasing values via callback.
342
+
///
343
+
/// [`ObservableCounter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`ObservableCounter`]s for the same instrument.
336
344
pubfnf64_observable_counter(
337
345
&self,
338
346
name:implInto<Cow<'static,str>>,
@@ -341,6 +349,8 @@ impl Meter {
341
349
}
342
350
343
351
/// creates an instrument builder for recording changes of a value.
352
+
///
353
+
/// [`UpDownCounter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`UpDownCounter`]s for the same instrument.
344
354
pubfni64_up_down_counter(
345
355
&self,
346
356
name:implInto<Cow<'static,str>>,
@@ -349,6 +359,8 @@ impl Meter {
349
359
}
350
360
351
361
/// creates an instrument builder for recording changes of a value.
362
+
///
363
+
/// [`UpDownCounter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`UpDownCounter`]s for the same instrument.
352
364
pubfnf64_up_down_counter(
353
365
&self,
354
366
name:implInto<Cow<'static,str>>,
@@ -357,6 +369,8 @@ impl Meter {
357
369
}
358
370
359
371
/// creates an instrument builder for recording changes of a value via callback.
372
+
///
373
+
/// [`ObservableUpDownCounter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`ObservableUpDownCounter`]s for the same instrument.
360
374
pubfni64_observable_up_down_counter(
361
375
&self,
362
376
name:implInto<Cow<'static,str>>,
@@ -365,6 +379,8 @@ impl Meter {
365
379
}
366
380
367
381
/// creates an instrument builder for recording changes of a value via callback.
382
+
///
383
+
/// [`ObservableUpDownCounter`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`ObservableUpDownCounter`]s for the same instrument.
368
384
pubfnf64_observable_up_down_counter(
369
385
&self,
370
386
name:implInto<Cow<'static,str>>,
@@ -373,6 +389,8 @@ impl Meter {
373
389
}
374
390
375
391
/// creates an instrument builder for recording independent values.
392
+
///
393
+
/// [`Gauge`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`Gauge`]s for the same instrument.
376
394
pubfnu64_gauge(
377
395
&self,
378
396
name:implInto<Cow<'static,str>>,
@@ -381,6 +399,8 @@ impl Meter {
381
399
}
382
400
383
401
/// creates an instrument builder for recording independent values.
402
+
///
403
+
/// [`Gauge`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`Gauge`]s for the same instrument.
384
404
pubfnf64_gauge(
385
405
&self,
386
406
name:implInto<Cow<'static,str>>,
@@ -389,6 +409,8 @@ impl Meter {
389
409
}
390
410
391
411
/// creates an instrument builder for recording independent values.
412
+
///
413
+
/// /// [`Gauge`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`Gauge`]s for the same instrument.
392
414
pubfni64_gauge(
393
415
&self,
394
416
name:implInto<Cow<'static,str>>,
@@ -397,6 +419,8 @@ impl Meter {
397
419
}
398
420
399
421
/// creates an instrument builder for recording the current value via callback.
422
+
///
423
+
/// [`ObservableGauge`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`ObservableGauge`]s for the same instrument.
400
424
pubfnu64_observable_gauge(
401
425
&self,
402
426
name:implInto<Cow<'static,str>>,
@@ -405,6 +429,8 @@ impl Meter {
405
429
}
406
430
407
431
/// creates an instrument builder for recording the current value via callback.
432
+
///
433
+
/// [`ObservableGauge`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`ObservableGauge`]s for the same instrument.
408
434
pubfni64_observable_gauge(
409
435
&self,
410
436
name:implInto<Cow<'static,str>>,
@@ -413,6 +439,8 @@ impl Meter {
413
439
}
414
440
415
441
/// creates an instrument builder for recording the current value via callback.
442
+
///
443
+
/// [`ObservableGauge`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`ObservableGauge`]s for the same instrument.
416
444
pubfnf64_observable_gauge(
417
445
&self,
418
446
name:implInto<Cow<'static,str>>,
@@ -421,6 +449,8 @@ impl Meter {
421
449
}
422
450
423
451
/// creates an instrument builder for recording a distribution of values.
452
+
///
453
+
/// [`Histogram`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`Histogram`]s for the same instrument.
424
454
pubfnf64_histogram(
425
455
&self,
426
456
name:implInto<Cow<'static,str>>,
@@ -429,6 +459,8 @@ impl Meter {
429
459
}
430
460
431
461
/// creates an instrument builder for recording a distribution of values.
462
+
///
463
+
/// [`Histogram`] can be cloned to create multiple handles to the same instrument. Avoid creating duplicate [`Histogram`]s for the same instrument.
0 commit comments