Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc9.8" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc9.9" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,18 @@ public static TracerProviderBuilder AddAspNetCoreInstrumentationWithBaggage(this
/// <param name="options"><see cref="AspNetCoreInstrumentationOptions"/> being configured.</param>
public static void EnrichWithBaggage(this AspNetCoreInstrumentationOptions options)
{
options.Enrich = (activity, eventName, _) =>
options.EnrichWithHttpRequest = (activity, request) =>
{
if (eventName == "OnStartActivity")
foreach (var entry in Baggage.Current)
{
foreach (var entry in Baggage.Current)
{
activity.SetTag(entry.Key, entry.Value);
}
activity.SetTag(entry.Key, entry.Value);
}
};
options.EnrichWithHttpResponse = (activity, response) =>
{
foreach (var entry in Baggage.Current)
{
activity.SetTag(entry.Key, entry.Value);
}
};
}
Expand Down