HistogramAttribute<T>.Name Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 metric name is SampleMetric
.
If Name
wasn't passed, the metric name would be RequestLatency
.
static partial class Metric
{
[Histogram<int>("RequestName", "RequestStatusCode", Name = "SampleMetric")]
static partial RequestLatency CreateRequestLatency(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 RequestLatency
if Name
wasn't provided.
Applies to
Sodelujte z nami v storitvi GitHub
Vir za to vsebino najdete v storitvi GitHub, kjer lahko tudi ustvarite in pregledate težave in zahtevke za uveljavitev sprememb. Če želite več informacij, glejte naš vodnik za sodelavce.