Table of Contents

Property SpanDestinationNameFormatter

Namespace
NATS.Client.Core
Assembly
NATS.Client.Core.dll

SpanDestinationNameFormatter

Gets or sets a function that formats the destination name used in span names.

public Func<string, string>? SpanDestinationNameFormatter { get; set; }

Property Value

Func<string, string>

Remarks

The input is the raw NATS subject. This only changes activity names, not telemetry tags.

It replaces the default two-token truncation entirely, so a formatter is responsible for keeping the names it returns low cardinality. Inbox subjects never reach it: they are collapsed to inbox first.

An exception thrown here is caught and the default naming is used for that span.