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

Improve tracing #580

Merged
merged 11 commits into from Oct 12, 2022
Merged

Improve tracing #580

merged 11 commits into from Oct 12, 2022

Conversation

stayallive
Copy link
Collaborator

@stayallive stayallive commented Oct 6, 2022

We used to set the transaction name as late as possible to make sure the routing information is available to us. However this doesn't work well with generating the new baggage so we now do it as early as Laravel allows us instead.

Few things I like to improve here still:

  • Use the RouteMatched event for setting the transaction name
  • Do not trace hard-404's (no route)
  • Do not trace HEAD requests

Discussion points:

  • Do we want to remove the route name (some.route) and controller class (SomeController@someAction) as options for transaction names and only keep the "route" version of the URL (some/{route})?
  • Do we allow people to opt-in HEAD request and hard-404 tracing?

Copy link
Member

@cleptric cleptric left a comment

Choose a reason for hiding this comment

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

The main reason for this change is to properly support the use case where the Laravel SDK is head of trace, setting the baggage in the meta tag. Having the transaction name figured out before the view is rendered is something we have to do.

Setting unified transaction names based on the route version sounds like a good idea.

Worth checking what happens in getsentry/sentry-python#1661 (comment). This will go out as a new major version anyway, but maybe we get some insights onto how many dashboards could be affected.

As mentioned in #562, I would wait for changes to how we instrument HEAD/OPTIONS requests for now.

A way to enable instrumentation on 404s sounds good to me.

src/Sentry/Laravel/Tracing/Middleware.php Show resolved Hide resolved
@cleptric cleptric added this to the 3.0.0 milestone Oct 6, 2022
Base automatically changed from drop-lumen-support to 3.x October 7, 2022 12:20
# Conflicts:
#	CHANGELOG.md
#	README.md
#	src/Sentry/Laravel/Tracing/EventHandler.php
#	src/Sentry/Laravel/Tracing/Middleware.php
#	test/Sentry/IntegrationTest.php
@cleptric cleptric mentioned this pull request Oct 11, 2022
19 tasks
* Remove extracting route name or controller for transaction names

* CS

* Add changelog entry
@cleptric cleptric marked this pull request as ready for review October 12, 2022 09:08
@cleptric cleptric merged commit 79a135d into 3.x Oct 12, 2022
@cleptric cleptric deleted the tracing-updates branch October 12, 2022 09:10
cleptric pushed a commit that referenced this pull request Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants