agentleFS
SentryKnown publishergetsentry/sentry-laravel/AGENTS.md

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

Dec 2025: 1 mentionJan 2026: 2 mentionsFeb 2026: 1 mentionMar 2026: 3 mentionsApr 2026: 1 mentionMay 2026: 2 mentionsJun 2026: 2 mentionsJul 2026: 1 mentionAug 2026: 1 mentionSep 2026: 1 mentionOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the getsentry/sentry-laravel repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about getsentry/sentry-laravel

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

24 more on GitHub
  • 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.

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
  1. Distinctive:

    Use this file for repo-specific constraints that are easy to miss, and explore the codebase for current implementation details.

    line 7
  2. Very specific:

    Use feature detection, not hard framework assumptions.

    line 19
  3. Distinctive:

    Do not assume optional packages are installed.

    line 22
  4. Very specific:

    Keep Laravel-specific config keys out of the base PHP SDK options.

    line 33
  5. Very specific:

    If a config value should be resolved from the container, update ServiceProvider::OPTIONS_TO_RESOLVE_FROM_CONTAINER.

    line 35
  6. Very specific:

    If you change tracing default integrations, keep config/sentry.php and Tracing/ServiceProvider::DEFAULT_INTEGRATIONS synchronized.

    line 37
  7. Very specific:

    Keep route transaction names URI-based.

    line 44
  8. Very specific:

    Do not remove Tracing\Middleware::signalRouteWasMatched().

    line 46
  9. Very specific:

    Keep the action_level handling in both log channels.

    line 57
  10. Distinctive:

    Add tests with every behavior change.

    line 74
  11. Distinctive:

    Prefer targeted PHPUnit runs while iterating.

    line 80
  12. Distinctive:

    After editing files, run the relevant formatting, lint, and test commands for the code you changed.

    line 81
  13. Very specific:

    Before handing back substantive code changes, run composer check when feasible and call out anything you could not run.

    line 83
  14. Very specific:

    Prefer Composer scripts over make develop.

    line 95
  15. Very specific:

    If a change may require updates in the separate documentation repo, ask the user whether to review ../sentry-docs if that sibling checkout …

    line 105
  16. Distinctive:

    If a code change affects installation, configuration, tracing, logging, or other user-facing behavior, call out the likely README or …

    line 111
  17. Very specific:

    Keep PublishCommand behavior and config examples internally consistent in code, but leave README synchronization to the manual docs …

    line 114

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

Overview

  • 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.

Compatibility Rules

  • 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 capture is part of the documented public setup flow through Integration::handles($exceptions) in bootstrap/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 targeted version_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.
  • Spotlight is treated like a DSN-present boot path. Do not accidentally gate runtime setup on DSN alone.
  • AboutCommand only exists on newer Laravel versions, HTTP client trace propagation depends on newer Factory APIs, and scheduler background context handoff switches behavior on Laravel 12.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.php and Tracing/ServiceProvider::DEFAULT_INTEGRATIONS synchronized.
  • Features\Feature intentionally 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 ServiceProvider and Tracing/ServiceProvider. Some features register unconditionally but only become active in boot().
  • 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\Middleware is stateful across requests in Octane-style workers. Reset logic around transaction, appSpan, didRouteMatch, and bootedTimestamp matters.
  • TransactionFinisher is singleton-based on purpose so terminate callbacks are only registered once and afterResponse() work can still be traced.
  • Classic Sentry event logging and structured logs use separate channels and handlers on purpose.
  • Keep the action_level handling in both log channels. It is intentionally unset to avoid double FingersCrossedHandler wrapping 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 under Tracing/ and Features/ are implementation details even if public in PHP terms. Prefer changing documented surfaces first.
  • Version constants in src/Sentry/Laravel/Version.php are 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/, not tests/.
  • test/Sentry/TestCase.php is the shared Orchestra Testbench harness. It captures Sentry events, transactions, and check-ins in memory via before_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 check when 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.neon only analyzes src and uses a baseline at level 1. Static analysis is helpful but not a substitute for targeted PHPUnit coverage.
  • phpunit.xml is strict about unexpected output, so noisy debug output will fail tests.
  • Prefer Composer scripts over make develop. The Makefile is a light wrapper and its develop target 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 serve workflow at the repository root.

Docs And Release Notes

  • README.md and CHANGELOG.md are 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-docs if 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's master branch 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 PublishCommand behavior and config examples internally consistent in code, but leave README synchronization to the manual docs workflow.
  • Release automation in .github/workflows/publish-release.yaml is a maintainer-only Craft workflow; do not modify release steps casually.

CI Notes

  • .github/workflows/ci.yaml runs the PHPUnit compatibility matrix across PHP and Laravel/Testbench combinations.
  • .github/workflows/cs.yaml runs PHP-CS-Fixer and PHPStan on a single recent PHP version rather than across the full test matrix.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.