Deila með


GaugeAttribute.Name Property

Definition

Gets or sets the name of the metric.

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
public string? Name { get; set; }
member this.Name : string with get, set
Public Property Name As String

Property Value

Examples

In this example, the metric name is SampleMetric. When Name is not provided, the return type of the method is used as metric name. In this example, the metric name would be MemoryUsage if Name wasn't provided.

static partial class Metric
{
    [Gauge(Name="SampleMetric")]
    static partial MemoryUsage CreateMemoryUsage(Meter meter);
}

Remarks

In this example the metric name is SampleMetric. When Name is not provided the return type of the method is used as metric name. In this example, this would be MemoryUsage if Name wasn't provided.

Applies to