Skip to content

Asp.Net replace {controller} and {action} with actual URL path element in span name / route attribute #4419

@urisimchoni

Description

@urisimchoni

Feature Request

Are you requesting automatic instrumentation for a framework or library? Please describe.

No

Is your feature request related to a problem? Please describe.

The current instrumentation for Asp.Net provides the route template as a basis for span name. However, when the application is using conventional routing, the template might refer to many unrelated operations.

For example, if the route template is "{controller}/{action}" then both the following URLs will have "{controller}/{action} as their span name:

  • /Products/List
  • /Users/Add

This creates confusion when analyzing spans based on the name (e.g. aggregating performance metrics per http route)

Describe the solution you'd like

We know the URL path, so replace the {controller} and {action} by their respective components of the URL path.

Describe alternatives you've considered

Add special .net-specific handling of Asp.Net spans

Additional context

Usually we prefer the route template over URI path because of possible high cardinality in the path. The {controller} and {action} template components do not signify high cardinality.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions