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
/// If the name is an empty string, the provider will use a default name.
63
63
///
64
-
/// This is a more convenient way of expressing `global::meter_provider().meter(name)`.
64
+
/// This is a more convenient way of expressing `global::meter_provider().meter(name, None, None)`.
65
65
pubfnmeter(name:&'staticstr) -> Meter{
66
66
meter_provider().meter(name,None,None)
67
67
}
68
68
69
-
/// Creates a [`Meter`] with the name and version.
69
+
/// Creates a [`Meter`] with the name, version and schema url.
70
+
///
71
+
/// - name SHOULD uniquely identify the instrumentation scope, such as the instrumentation library (e.g. io.opentelemetry.contrib.mongodb), package, module or class name.
72
+
/// - version specifies the version of the instrumentation scope if the scope has a version
73
+
/// - schema url specifies the Schema URL that should be recorded in the emitted telemetry.
74
+
///
75
+
/// This is a convenient way of `global::meter_provider().meter(...)`
76
+
/// # Example
77
+
/// ```rust
78
+
/// use opentelemetry_api::global::meter_with_version;
79
+
/// let meter = meter_with_version("io.opentelemetry", Some("0.17"), Some("https://opentelemetry.io/schemas/1.2.0"));
0 commit comments