Skip to content

Set proxy.forwarder activity DisplayName to request path#3031

Open
LindqvistMartin wants to merge 1 commit into
dotnet:mainfrom
LindqvistMartin:fix/2667-trace-request-path
Open

Set proxy.forwarder activity DisplayName to request path#3031
LindqvistMartin wants to merge 1 commit into
dotnet:mainfrom
LindqvistMartin:fix/2667-trace-request-path

Conversation

@LindqvistMartin
Copy link
Copy Markdown

Fixes #2667.

The proxy.forwarder activity is created with a constant name, so every YARP request shows up under the same name in Aspire / OTel dashboards. This sets DisplayName to Request.Path so requests are distinguishable. OperationName stays "proxy.forwarder" so anything filtering by activity name isn't affected. Empty paths keep the default.

Added Invoke_SetsActivityDisplayName_FromRequestPath in ProxyPipelineInitializerMiddlewareTests. Verified it fails on main and passes with the change.

The issue is tagged Type: Documentation — let me know if you'd rather close this in favor of a docs-only fix instead.

@LindqvistMartin
Copy link
Copy Markdown
Author

@dotnet-policy-service agree

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.

Telemetry - use the request path for name of trace

1 participant