Order of tags in Activity.Tags is reversed

Activity.Tags now stores items in the list according to the order they are added, that is, the first item that's added is first in the list. This change was made to match the OpenTelemetry Attributes specification.

Change description

In previous .NET versions, Activity.Tags stores items in the reverse order from which they're added. That is, the first item added is last in the list. Starting in .NET 5, the order of the items is reversed, and the first item added is always first in the list.

Version introduced

5.0

If your app has a dependency on the Activity.Tags list order and you're upgrading to .NET 5 or later, you'll need to change this part of your code.

Affected APIs