Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Log Alarm Laravel Package

saasscaleup/laravel-log-alarm

Log Alarm monitors your Laravel application's logs in real time, detects error events, and instantly notifies you via Slack and email. Frequency thresholds and cache-based tracking prevent alert flooding, keeping your team informed without the noise.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • In-process, single-purpose package: it hooks Laravel's log event pipeline, increments a counter in the configured cache store, and fans out to Slack / email / Telegram / Discord once the threshold is crossed inside a time window. It is not an agent, sidecar, or external service — it lives and dies with the application process.
  • Good fit for the "one or a few Laravel monoliths, no observability budget, no on-call tooling" profile. Poor fit for polyglot estates, microservice fleets, or any team needing trace correlation, alert routing, escalation policies, or cross-service aggregation. Against Sentry/Datadog/CloudWatch it is a gap-filler, not a substitute.
  • Footprint is deliberately thin: no queue worker, no new infrastructure, no real database usage (the publish step emits a migration that appears vestigial — expect to explain it to reviewers). That thinness is the architectural virtue and the ceiling.
  • Alerting policy is encoded in .env (LA_LOG_TYPE, LA_LOG_TIME_FRAME, LA_LOG_PER_TIME_FRAME, LA_DELAY_BETWEEN_ALARMS, LA_SPECIFIC_STRING). Treat this as an on-call policy artifact requiring a decision record and change control, not a per-developer toggle.

Integration feasibility

  • Genuinely low cost: composer require, vendor:publish, a handful of env vars, and a five-error smoke test in Tinker. A mid-level Laravel engineer can produce a go/no-go recommendation in roughly half a day.
  • Declared support is PHP >= 7 / Laravel >= 5, which is implausibly broad as a verified claim — no CI matrix is evidenced. Validate against our exact PHP and Laravel versions, our Monolog channel configuration, and our cache driver before any commitment.
  • Zero dependents and a modest 269 stars mean we will be among the first production users of the current release. That is acceptable for a thin, inspectable package but argues for a read-the-source review rather than trusting the README.

Technical risk

  • Cache-driver coupling is the primary risk. Counters live in the cache. With Redis/Memcached, counts aggregate across nodes; with file/database-per-node cache they fragment, which silently suppresses alerts or multiplies them. Our cache topology is effectively part of the alerting contract.
  • Synchronous work on the error path. Notifications are dispatched from log handling. If Slack/webhook/email calls are not queued, a slow third party adds latency to requests that are already failing — an incident amplifier. Verify queuing and failure isolation.
  • Recursion and feedback loops. If the notifier throws and that is itself logged, the listener can re-enter. Confirm guards exist.
  • Data exposure. Alert payloads include log messages and, since v1.0.5, file path and line number. Error text can contain PII, tokens, or SQL fragments; Slack channels and email distribution lists become a new data egress surface.
  • Naive matching. specific_string is substring matching against log text, and log_type accepts a comma list. Expect false positives from noisy messages and false negatives from message-format drift.
  • Bus factor. Single maintainer (with occasional community PRs) and a low overall score. Acceptable, but only with a documented fork plan.
  • Alert semantics. No severity routing, no escalation, no auto-resolution notice; delay_between_alarms is the only suppression mechanism. Fatigue is a realistic outcome at default thresholds.

Key questions

  1. Are Slack/Telegram/Discord/email notifications queued or synchronous, and are delivery failures swallowed or surfaced?
  2. What cache keys are used, do they embed the full log message (unbounded key growth), and what TTL applies?
  3. Is the v1.0.7 cache locking sufficient under concurrent workers, or are duplicate alerts still possible at scale?
  4. Does it observe all Monolog channels, or only the default stack/single channel? What happens with custom channels and daily rotation?
  5. Which exact Laravel/PHP versions are actually exercised in CI (if any)?
  6. Does the package guard against self-referential logging from the notifier itself?
  7. What is the maintainer's stated support posture and expected cadence for future Laravel majors?

Integration Approach

Stack fit

  • Assumes a standard Laravel app on PHP 8.x with a shared Redis cache (for cross-node counter aggregation) and a working queue worker for outbound notifications. Slack as the first channel; email second because it introduces SMTP/provider deliverability as a dependency and a wider distribution list.
  • Pairs naturally with existing logging rather than replacing it: Laravel Log stays the source of truth, this package adds threshold-based notification on top.

Migration path

  • Purely additive. No schema changes of consequence (ignore or remove the published migration), no changes to existing logging calls, and a clean exit — remove the service provider, drop the config and env keys.
  • Explicitly position it as a complement, not a replacement, for whatever error tracking exists today. If we have no error tracking, accept that this covers only the "did errors spike" signal, not "what broke and for whom."

Compatibility

  • Verify against our Laravel version and Monolog channel setup first; the >= 5 / >= 7 claim is marketing, not evidence.
  • Validate env var typing — v1.0.6 added (int) casts, which suggests prior string-comparison bugs in threshold logic. Confirm the pinned version includes that fix (v1.0.7 or later).
  • Check cache driver behavior in each environment: staging and production must use the same shared cache backend or thresholds will behave differently between them.

Sequencing

  1. Spike (0.5 day): install in a throwaway Laravel app on our version, read the source for cache keys, queuing, recursion guards, and channel coverage. Produce a written recommendation.
  2. Staging pilot (1–2 days): Slack only, low threshold, deliberately trigger errors. Measure notification latency, duplicate rate, and whether request latency degrades.
  3. Tune: run against real staging traffic for a week; set log_per_time_frame and delay_between_alarms from observed noise, not defaults. Record the rationale in a config decision record.
  4. Production, Slack only: single app, single channel, one owning team. Add email distribution only after the Slack signal proves trustworthy.
  5. Document and schedule review: runbook entry plus a 90-day reassessment against buying a real error-tracking service.

Operational Impact

Maintenance

  • Low ongoing code maintenance, high ownership obligation. MIT license, single primary maintainer, community-contributed channels. Pin the version, watch the repo, and be prepared to fork; the package is small enough that forking is genuinely viable if it becomes load-bearing.
  • Budget for Laravel major-upgrade reviews: an unmaintained log-event listener can break silently on framework internals changes, and silent breakage means no alerts.

Support

  • No vendor, no SLA, community issues only. Requires a named internal owner (platform or backend lead) who can read the source during an incident. Do not adopt without that person identified.

Scaling

  • Alert volume is bounded by delay_between_alarms, so notification fan-out scales predictably. The scaling pressure is on the cache: high error rates mean high counter write rates, and if keys embed full messages, key cardinality and eviction become real concerns.
  • Multi-node deployments only behave correctly with a shared cache backend. Autoscaling groups with per-instance caches will produce inconsistent, partially-missing alerts.
  • Not designed for per-tenant or per-service routing; any segmentation has to come from deploying it per application.

Failure modes

  • Silent suppression is the worst case: cache unavailable, keys evicted, or config drift and no alerts fire — with no signal that alerting is dead. Mitigate with an external heartbeat (a scheduled synthetic error and a check that the alert arrived) or by treating this as best-effort telemetry.
  • Alert storms: threshold too low plus a noisy log line equals channel fatigue; teams mute the channel and the tool becomes decorative.
  • Latency amplification: synchronous notifier calls slow down already-failing requests.
  • False negatives: substring matching and message-format drift mean specific errors are never matched.
  • Data leakage: error text and stack locations land in third-party channels.
  • Duplicate or split alerts across nodes under file-cache or lock contention.

Ramp-up

  • Engineering: roughly half a day to install and validate, one to two days to tune — not a multi-sprint project.
  • On-call: a short runbook section covering what these alerts mean, what they cannot tell you (no user impact, no trace, no dedup across services), and the escalation step that kicks in — likely "open the error tracker / check logs manually."
  • Stakeholder expectation-setting is the real ramp-up cost: this delivers "something is erroring repeatedly," not production-grade observability, and should be communicated as a stopgap with a review date attached.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
teamzac/geocoder
ideatica/config-writer
keaton-php/pipe-dream
jacksonwebservices/laravel-user-suite
maksimru/conditional-laravel-debugbar
gismatul/nova-support-chat
gismatul/laravel-support-chat
networkrailbusinesssystems/oracle-api
alphabalex/messaging-made-easy
rawphp/warp
shootkiran/merobug
narakode/fineauth
numencode/wn-syncops-plugin
ibnnajjaar/mib-global-pay
ably/pubsub-server
mstfkhazaal/defender
mfonte/base62x
karnoweb/metapilot
tobya/bcsapiwrapper
swalker2/cpanel