Прочетете на английски

Споделяне чрез


ILatencyContext.SetTag(TagToken, String) Method

Definition

Adds a tag to the context.

C#
public void SetTag(Microsoft.Extensions.Diagnostics.Latency.TagToken token, string value);

Parameters

token
TagToken

The tag token.

value
String

The value of the tag.

Exceptions

value is null.

Remarks

Tags are used to provide metadata to the context. These are pivots that are useful to slice and dice the data for analysis. Examples include API, Client, and UserType. Setting a tag with the same name overrides its prior value, that is, the last call wins.

Applies to

Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)