Skip to content

[AspNetCore] Do not add built-in tags for v11+#2

Draft
martincostello wants to merge 1 commit intodotnet-vnextfrom
gh-3808
Draft

[AspNetCore] Do not add built-in tags for v11+#2
martincostello wants to merge 1 commit intodotnet-vnextfrom
gh-3808

Conversation

@martincostello
Copy link
Copy Markdown
Owner

Relates to open-telemetry#3808.

Changes

Do not add tags to activities for ASP.NET Core 11 that are already added by the framework.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@@ -206,17 +214,22 @@ public void OnStartActivity(Activity activity, object? payload)
TelemetryHelper.RequestDataHelper.SetHttpMethodTag(activity, request.Method);

activity.SetTag(SemanticConventions.AttributeUrlScheme, request.Scheme);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't values like this still set when .NET 11? Shouldn't everything alraedy be set by ASP.NET Core? If values are missing, should consider adding them to ASP.NET Core.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a look.

So far this PR was just removing the stuff I saw in the diff of your PR. If some of it was being added already anyway in 10, then I can trim stuff out separately in main.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was added in dotnet/aspnetcore#62090, so we should be able to drop some stuff for .NET 10 in the current codebase ahead of .NET 11.

I'll work on that now, then come back to these changes once those are merged.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open-telemetry#3993

I've identified two things that are missing in .NET 11 - I'll create an issue there for discussion.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not add tags to activities for ASP.NET Core 11 that are already added by the framework.

Relates to open-telemetry#3808.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

This PR was marked stale due to lack of activity. It will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants