Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Mvc3 instrumentation to better handle Controller and Action misses #608

Merged
merged 6 commits into from
Jun 21, 2021

Conversation

tehbio
Copy link
Contributor

@tehbio tehbio commented Jun 15, 2021

Description

Resolves #155 by adding some extra Mvc3 instrumentation to handle missing Controllers or Actions already targeted by the Route.

These request transactions now get appropriately named WebTransaction/StatusCode/404, mirroring AspNetCore instrumentation.

Testing

Included is an update to the BasicMvcApplication integration test to include these types of 404 requests, and validate that they are no longer generating MGI.

@tehbio tehbio requested a review from vuqtran88 June 15, 2021 21:30
@tehbio
Copy link
Contributor Author

tehbio commented Jun 15, 2021

I decided to instead move the added validation logic to a new BasicMvcNotFoundTests integration test to avoid the hacky Delay() call needed when they are grouped together to trigger the proper transaction trace.

Copy link
Contributor

@vuqtran88 vuqtran88 left a comment

Choose a reason for hiding this comment

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

This is a pretty clever approach. 🚢 it !

Copy link
Contributor

@JcolemanNR JcolemanNR left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@tehbio tehbio merged commit 6c0baeb into main Jun 21, 2021
@tehbio tehbio deleted the mvc3-mgi-fixes branch June 21, 2021 16:46
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.

MVC Invalid Action for valid Controller can cause MGI
3 participants