SocketsHttpHandler.MeterFactory 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.

Important

This API is not CLS-compliant.

Gets or sets the IMeterFactory to create a custom Meter for the SocketsHttpHandler instance.

C#
[System.CLSCompliant(false)]
public System.Diagnostics.Metrics.IMeterFactory? MeterFactory { get; set; }

Property Value

Attributes

Exceptions

An operation has already been started on the current instance.

The current instance has been disposed.

Remarks

When MeterFactory is set to a non-null value, all metrics emitted by the SocketsHttpHandler instance will be recorded using the Meter provided by the IMeterFactory.

Applies to

Product Versions
.NET 8, 9, 10