Skip to content

MetricExtensions

Namespace: Hex1b

Assembly: Hex1b.dll

Extension methods for assigning metric names to widgets.

csharp
public static class MetricExtensions

Inheritance

ObjectMetricExtensions

Methods

MetricName<TWidget>(TWidget, string)

Sets the metric name for this widget. When per-node metrics are enabled, this name becomes a segment in the hierarchical metric path used as a tag value on per-node timing histograms (e.g., hex1b.node.render.duration).

Parameters:

  • widget (<TWidget>): The widget to name.
  • name (String): The metric name segment. Should be a short, descriptive identifier (e.g., "sidebar", "orders-table", "editor"). Ancestor names are automatically composed into a dot-separated path.

Returns: <TWidget>

A copy of the widget with the metric name set.

csharp
public static TWidget MetricName<TWidget>(this TWidget widget, string name) where TWidget : Hex1bWidget

Released under the MIT License.