<PackageReference Include="OpenTelemetry.Api" Version="1.9.0" />

OpenTelemetry.Trace.ActivityHelperExtensions

Extension methods on Activity.
public static object GetTagValue(this Activity activity, string tagName)

Gets the value of a specific tag on an Activity.

public static bool TryCheckFirstTag(this Activity activity, string tagName, out object tagValue)

Checks if the user provided tag name is the first tag of the Activity and retrieves the tag value.

public static bool TryGetStatus(this Activity activity, out StatusCode statusCode, out string statusDescription)

Gets the status of activity execution. Activity class in .NET does not support 'Status'. This extension provides a workaround to retrieve Status from special tags with key name otel.status_code and otel.status_description.