sentry-laravel
AGENTS.md1.4k starsChanged 9 months agoMITView on GitHub
- sentry/sentry-laravel is a Composer library, not a runnable Laravel app. - It adapts sentry/sentry to Laravel and Lumen. - Use this file for repo-specific constraints that are easy to miss, and explore the codebase for current implementation details. - Shipped code must remain valid on PHP 7.2 unless the package minimum is intentionally being raised. composer.json still allows ^7.2 | ^8.0. - This package supports illuminate/support ^6 through ^13. Keep cross-version behavior intact. - For Laravel 11+, unhandled exception…
Trending
Quiet since September.about the whole repository
Who's talking about getsentry/sentry-laravel
- openai-php/laravel“Switch to Laravel HTTP client for compatibility with Pulse, Telescope, Sentry etc”GitHub · Nov 25, 2023 · 13 reactions
- stayallive/wp-sentry“PHP Performance Monitoring / Tracing support”GitHub · Aug 7, 2020 · 7 reactions
- stayallive/wp-sentry“Tracking of SQL queries”GitHub · Apr 28, 2022 · 4 reactions
- getsentry/team-sdks“Tracing: W3C Trace Context Support”GitHub · Nov 20, 2023 · 3 reactions
- getsentry/sentry-php“fix: Strip breadcrumb metadata on OOM to prevent silent event loss”GitHub · Jul 7, 2026 · 2 reactions
The biggest 5 of 29 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 29
Talked about on GitHub (29 times).
On GitHub · 29
- Nov 25, 2023Switch to Laravel HTTP client for compatibility with Pulse, Telescope, Sentry etc — openai-php/laravel13 reactions · 7 comments
- Aug 7, 2020PHP Performance Monitoring / Tracing support — stayallive/wp-sentry7 reactions · 19 comments
- Apr 28, 2022Tracking of SQL queries — stayallive/wp-sentry4 reactions · 12 comments
- Nov 20, 2023Tracing: W3C Trace Context Support — getsentry/team-sdks3 reactions · 9 comments
- Jul 7, 2026fix: Strip breadcrumb metadata on OOM to prevent silent event loss — getsentry/sentry-php2 reactions · 2 comments
24 more on GitHub
- Jun 5, 2026fix: prevent feature flags being serialized as object — getsentry/sentry-php2 reactions
- Feb 1, 2026Bump sentry/sentry-laravel from 4.20.0 to 4.20.1 in /imageViewer — mkaraki/IllustStore2 reactions · 5 comments
- Jan 29, 2026Feature Request: Add CLI Test Command for Sentry Integration — networkteam/sentry_client2 reactions
- Jan 1, 2026Bump sentry/sentry-laravel from 4.18.0 to 4.20.0 in /imageViewer — mkaraki/IllustStore2 reactions · 2 comments
- Nov 1, 2025Bump sentry/sentry-laravel from 4.17.0 to 4.18.0 in /imageViewer — mkaraki/IllustStore2 reactions · 1 comment
- Jul 14, 2023Provide docs for Monolog integration and make it an "official integration". — getsentry/sentry-docs2 reactions · 4 comments
- Jan 24, 2023Crons: SDK for Laravel — getsentry/sentry2 reactions · 1 comment
- Aug 1, 2022Improve parameterization of transaction names — getsentry/sentry-symfony2 reactions · 4 comments
- Sep 1, 2026Bump the composer-all group across 1 directory with 11 updates — mkaraki/IllustStore1 reaction · 3 comments
- Aug 1, 2026Bump the composer-all group across 1 directory with 10 updates — mkaraki/IllustStore1 reaction · 4 comments
- Jun 1, 2026Bump the composer-all group across 1 directory with 11 updates — mkaraki/IllustStore1 reaction · 4 comments
- May 7, 2026ref: add CodeLocationResolver — getsentry/sentry-php1 reaction
- Mar 3, 2026Bump the composer-prod group with 6 updates — saproto/saproto1 reaction
- Mar 1, 2026Bump sentry/sentry-laravel from 4.20.1 to 4.21.0 in /imageViewer — mkaraki/IllustStore1 reaction · 6 comments
- Dec 22, 2025Bump sentry/sentry-laravel from 4.15.1 to 4.20.0 — rebots-online/monicarm1 reaction
- Aug 14, 2024Set HTTP client breadcrumbs log level based on response status code — getsentry/team-sdks1 reaction · 3 comments
- Nov 17, 2023Project Request: Query Source — getsentry/team-sdks1 reaction · 6 comments
- Mar 16, 2023Support for Crons on Hangfire — getsentry/sentry-dotnet1 reaction · 11 comments
- Oct 19, 2022Standardize SDK licenses on MIT — getsentry/open-source-pledge1 reaction · 3 comments
- Feb 25, 2019Notice: unserialize(): Error at offset 0 of 125 bytes — laravel/framework1 reaction · 13 comments
- Aug 19, 2016getsentry/sentry-laravel — jenssegers/laravel-raven1 reaction · 1 comment
- May 1, 2026Bump the composer-all group in /imageViewer with 10 updates — mkaraki/IllustStore0 reactions · 4 comments
- Apr 1, 2026Bump the composer-all group in /imageViewer with 7 updates — mkaraki/IllustStore0 reactions · 6 comments
- Mar 20, 2026Bump the composer-all group in /imageViewer with 11 updates — mkaraki/IllustStore0 reactions · 4 comments
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
17 rules. About 0 are common, 6 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Use this file for repo-specific constraints that are easy to miss, and explore the codebase for current implementation details.
- Very specific: line 19
Use feature detection, not hard framework assumptions.
- Distinctive: line 22
Do not assume optional packages are installed.
- Very specific: line 33
Keep Laravel-specific config keys out of the base PHP SDK options.
- Very specific: line 35
If a config value should be resolved from the container, update ServiceProvider::OPTIONS_TO_RESOLVE_FROM_CONTAINER.
- Very specific: line 37
If you change tracing default integrations, keep config/sentry.php and Tracing/ServiceProvider::DEFAULT_INTEGRATIONS synchronized.
- Very specific: line 44
Keep route transaction names URI-based.
- Very specific: line 46
Do not remove Tracing\Middleware::signalRouteWasMatched().
- Very specific: line 57
Keep the action_level handling in both log channels.
- Distinctive: line 74
Add tests with every behavior change.
- Distinctive: line 80
Prefer targeted PHPUnit runs while iterating.
- Distinctive: line 81
After editing files, run the relevant formatting, lint, and test commands for the code you changed.
- Very specific: line 83
Before handing back substantive code changes, run composer check when feasible and call out anything you could not run.
- Very specific: line 95
Prefer Composer scripts over make develop.
- Very specific: line 105
If a change may require updates in the separate documentation repo, ask the user whether to review ../sentry-docs if that sibling checkout …
- Distinctive: line 111
If a code change affects installation, configuration, tracing, logging, or other user-facing behavior, call out the likely README or …
- Very specific: line 114
Keep PublishCommand behavior and config examples internally consistent in code, but leave README synchronization to the manual docs …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Overview
sentry/sentry-laravelis a Composer library, not a runnable Laravel app.- It adapts
sentry/sentryto Laravel and Lumen. - Use this file for repo-specific constraints that are easy to miss, and explore the codebase for current implementation details.
Compatibility Rules
- Shipped code must remain valid on PHP
7.2unless the package minimum is intentionally being raised.composer.jsonstill allows^7.2 | ^8.0. - This package supports
illuminate/support^6through^13. Keep cross-version behavior intact. - For Laravel
11+, unhandled exception capture is part of the documented public setup flow throughIntegration::handles($exceptions)inbootstrap/app.php; the service provider does not replace that step. - Use feature detection, not hard framework assumptions. Preserve the existing
style of
class_exists(),method_exists(), and targetedversion_compare()checks for newer Laravel APIs. - Do not assume optional packages are installed. Folio, Pennant, Livewire, Lighthouse, Sanctum, Octane, and newer Laravel Context APIs are all guarded in the codebase and tests.
Spotlightis treated like a DSN-present boot path. Do not accidentally gate runtime setup on DSN alone.AboutCommandonly exists on newer Laravel versions, HTTP client trace propagation depends on newerFactoryAPIs, and scheduler background context handoff switches behavior on Laravel12.40.2+.
Editing Guidance
- Keep Laravel-specific config keys out of the base PHP SDK options. If you add
new Laravel-only config, update
ServiceProvider::LARAVEL_SPECIFIC_OPTIONS. - If a config value should be resolved from the container, update
ServiceProvider::OPTIONS_TO_RESOLVE_FROM_CONTAINER. - If you change tracing default integrations, keep
config/sentry.phpandTracing/ServiceProvider::DEFAULT_INTEGRATIONSsynchronized. Features\Featureintentionally swallows setup failures so host apps do not break. Regressions can fail silently; tests are the real safety net.- Preserve DSN/Spotlight boot gating in
ServiceProviderandTracing/ServiceProvider. Some features register unconditionally but only become active inboot(). - Keep route transaction names URI-based.
Integration::extractNameAndSourceForRoute()intentionally uses normalized route URIs, not Laravel route names. - Do not remove
Tracing\Middleware::signalRouteWasMatched(). Missing-route dropping depends on it. - Preserve span push/pop symmetry. Queue, notifications, HTTP client, scheduler, and tracing event handlers all depend on careful scope restoration.
Tracing\Middlewareis stateful across requests in Octane-style workers. Reset logic aroundtransaction,appSpan,didRouteMatch, andbootedTimestampmatters.TransactionFinisheris singleton-based on purpose so terminate callbacks are only registered once andafterResponse()work can still be traced.- Classic Sentry event logging and structured logs use separate channels and handlers on purpose.
- Keep the
action_levelhandling in both log channels. It is intentionally unset to avoid doubleFingersCrossedHandlerwrapping on newer Laravel versions. - Storage instrumentation is decorator-based. If Laravel adds new filesystem methods, update the storage wrappers instead of assuming passthrough behavior is automatic.
- Model violation reporters may defer reporting with
app()->terminating(). Preserve duplicate suppression and callback chaining behavior. Integration::flushEvents()and several classes underTracing/andFeatures/are implementation details even if public in PHP terms. Prefer changing documented surfaces first.- Version constants in
src/Sentry/Laravel/Version.phpare updated by the release action. Do not modify them manually as part of normal development changes.
Test Expectations
- Add tests with every behavior change. This is a library repo with broad integration coverage.
- New tests belong under
test/Sentry/, nottests/. test/Sentry/TestCase.phpis the shared Orchestra Testbench harness. It captures Sentry events, transactions, and check-ins in memory viabefore_send,before_send_transaction, and a global processor.- Prefer targeted PHPUnit runs while iterating.
- After editing files, run the relevant formatting, lint, and test commands for the code you changed.
- Before handing back substantive code changes, run
composer checkwhen feasible and call out anything you could not run. - Some integrations are only partially covered. If you change Livewire,
continue_after_response, view tracing failure paths, storage cloud adapters, or scheduler background fallbacks, add focused coverage.
Tools And Commands
phpstan.neononly analyzessrcand uses a baseline at level1. Static analysis is helpful but not a substitute for targeted PHPUnit coverage.phpunit.xmlis strict about unexpected output, so noisy debug output will fail tests.- Prefer Composer scripts over
make develop. TheMakefileis a light wrapper and itsdeveloptarget also changes local git config, which is not necessary for normal agent work. - This repo is a package, so do not expect a real app entrypoint or a useful
php artisan serveworkflow at the repository root.
Docs And Release Notes
README.mdandCHANGELOG.mdare updated manually during releases, so do not modify them as part of normal development changes.- If a change may require updates in the separate documentation repo, ask the
user whether to review
../sentry-docsif that sibling checkout exists. If it does not exist, ask the user for the local docs path first. If they opt in, update that repo'smasterbranch when safe, use git worktrees to inspect the relevant docs, and suggest any needed changes to avoid stale documentation. - If a code change affects installation, configuration, tracing, logging, or other user-facing behavior, call out the likely README or release-note follow up in your summary instead of editing those files automatically.
- Keep
PublishCommandbehavior and config examples internally consistent in code, but leave README synchronization to the manual docs workflow. - Release automation in
.github/workflows/publish-release.yamlis a maintainer-only Craft workflow; do not modify release steps casually.
CI Notes
.github/workflows/ci.yamlruns the PHPUnit compatibility matrix across PHP and Laravel/Testbench combinations..github/workflows/cs.yamlruns PHP-CS-Fixer and PHPStan on a single recent PHP version rather than across the full test matrix.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

