getsentry / getsentry/sentry-laravel

Errors not getting grouped when they are the same from inside blade files

Open
#513 9 comments 0 reactions 0 assignees View on GitHub
Errors Improvement Laravel
Dominant language
PHP
Stars
1.4k
Forks
211
Avg merge
15h 57m
Merged PRs (30d)
3

Description

### Environment

How do you use Sentry?
Sentry SaaS ([sentry.io]())

Which SDK and version?
sentry.php.laravel 2.8.0

### Steps to Reproduce

Whenever an error happens from inside a blade file, they are added as a new issue, if the error was in a different version. (we clear blade cache on each release)

![image](https://uploads.linear.app/3ed206af-f87a-40aa-82a0-150bf83e43e6/d7d8e0e1-0738-4ffb-9d64-aba37bffd909/1410a668-cec4-4fc2-a1d5-1a30052764d8?signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRoIjoiLzNlZDIwNmFmLWY4N2EtNDBhYS04MmEwLTE1MGJmODNlNDNlNi9kN2Q4ZTBlMS0wNzM4LTRmZmItOWQ2NC1hYmEzN2JmZmQ5MDkvMTQxMGE2NjgtY2VjNC00ZmMyLWExZDUtMWEzMDA1Mjc2NGQ4IiwiaWF0IjoxNzc0MDgwNTUxLCJleHAiOjE4MDU2NTExMTF9.LfH_xHh4qR-GQVgk-f6_ijrE2AWtCtZLZJcR_GT4GPU)

When looking at the stacktrace, the reason it doesn't group them might be because of `param0`, which contains the hashed id of the cached blade file. This means when we clear the cache, that id will be different, and sentry will detect it as a different issue.

![image](https://uploads.linear.app/3ed206af-f87a-40aa-82a0-150bf83e43e6/7755a4ab-0127-48d7-9767-20a739e9708e/0aebe4ad-4d4d-4662-b8ae-cfdc185f28b8?signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRoIjoiLzNlZDIwNmFmLWY4N2EtNDBhYS04MmEwLTE1MGJmODNlNDNlNi83NzU1YTRhYi0wMTI3LTQ4ZDctOTc2Ny0yMGE3MzllOTcwOGUvMGFlYmU0YWQtNGQ0ZC00NjYyLWI4YWUtY2ZkYzE4NWYyOGI4IiwiaWF0IjoxNzc0MDgwNTUxLCJleHAiOjE4MDU2NTExMTF9.GoLCgTLV0EQdK_guBGUH0WJoZ2zwEGiQUFf1ywDRSGI)

Another plausible reason could be that sentry reports that the stacktrace cannot be found for issues, as long as the issue happens inside a blade file. (warning is not shown in non blade files)

![image](https://uploads.linear.app/3ed206af-f87a-40aa-82a0-150bf83e43e6/ed29fb5f-2666-4238-af50-45ff3087ddd0/367f07bd-542d-44fb-9c9e-ea8b27615994?signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRoIjoiLzNlZDIwNmFmLWY4N2EtNDBhYS04MmEwLTE1MGJmODNlNDNlNi9lZDI5ZmI1Zi0yNjY2LTQyMzgtYWY1MC00NWZmMzA4N2RkZDAvMzY3ZjA3YmQtNTQyZC00NGZiLTljOWUtZWE4YjI3NjE1OTk0IiwiaWF0IjoxNzc0MDgwNTUxLCJleHAiOjE4MDU2NTExMTF9.VIm-lGBT4BVTlTYzAVPw-r2XebKa-ScSf-Yq7kUwl5U)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Blade-file error across releases while clearing the Blade cache, then compare the reported stack traces and grouping data, especially param0. Confirm whether the cached Blade file identifier or missing stack trace prevents grouping; done means equivalent errors group together across cache-clearing releases.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.