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
/// Sets the given [`MeterProvider`] instance as the current global meter
13
13
/// provider.
14
+
///
15
+
/// **Note:** This function should be called before getting [`Meter`] instances via [`meter()`] or [`meter_with_scope()`]. Otherwise, you could get no-op [`Meter`] instances.
/// If the name is an empty string, the provider will use a default name.
35
37
///
36
38
/// This is a more convenient way of expressing `global::meter_provider().meter(name)`.
39
+
///
40
+
/// **Note:** Calls to [`meter()`] return a [`Meter`] backed by the global [`MeterProvider`] configured during the method invocation.
41
+
/// If the global [`MeterProvider`] is changed after getting [`Meter`] instances from these calls, the [`Meter`] instances returned will not reflect the change.
37
42
pubfnmeter(name:&'staticstr) -> Meter{
38
43
meter_provider().meter(name)
39
44
}
40
45
41
46
/// Creates a [`Meter`] with the given instrumentation scope.
42
47
///
43
48
/// This is a simpler alternative to `global::meter_provider().meter_with_scope(...)`
44
-
///
49
+
///
50
+
/// **Note:** Calls to [`meter_with_scope()`] return a [`Meter`] backed by the global [`MeterProvider`] configured during the method invocation.
51
+
/// If the global [`MeterProvider`] is changed after getting [`Meter`] instances from these calls, the [`Meter`] instances returned will not reflect the change.
0 commit comments