MeterFactoryExtensions.Create Method

Definition

Creates a Meter with the specified name, version, and tags.

public static System.Diagnostics.Metrics.Meter Create (this System.Diagnostics.Metrics.IMeterFactory meterFactory, string name, string? version = default, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags = default);

Parameters

meterFactory
IMeterFactory

The IMeterFactory to use to create the Meter.

name
String

The name of the Meter.

version
String

The version of the Meter.

tags
IEnumerable<KeyValuePair<String,Object>>

The tags to associate with the Meter.

Returns

A Meter with the specified name, version, and tags.

Applies to

Product Versions
.NET 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)