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 Telegram Logger Laravel Package

jeffersongoncalves/laravel-telegram-logger

A Laravel package that adds a Telegram logging channel, sending application logs directly to Telegram chats via a bot. Configure the bot token, chat ID, and log level to receive real-time notifications and monitor errors, warnings, and other events from your Laravel app.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package installs as a Laravel/Monolog logging channel, so it slots into the framework's native config/logging.php channel system rather than requiring application code changes — a handler registered behind the Log facade, configured via published config and env vars. Delivery is decoupled from the request path through a queued job, which is the correct shape: a slow or failing third-party API should never add latency to a web request. The stated lineage (sibling of laravel-discord-logger, "same production pipeline") is a positive signal for architectural consistency — a team already running the Discord logger gets a familiar mental model, config shape, and operational runbook. The feature set is unusually complete for a 1.0.0: dedup with occurred N× roll-up, error grouping strategies, rate limiting, per-level/forum-topic routing, mentions, silent levels, and structured HTML sections all match what a production alerting channel actually needs. The 4096-character clamp with a full stacktrace delivered as a replying stacktrace.txt document is a pragmatic answer to Telegram's message limit.

Integration feasibility. Low effort. Composer install, publish config, set bot token and chat id, smoke-test with php artisan telegram-logger:test [--exception]. The graceful no-op when credentials are absent means the package can be installed into staging and CI without breaking anything before provisioning is complete — a genuinely considerate design choice, though see the failure-mode caveat below.

Technical risk. Five items dominate:

  1. Data egress of sensitive logs. Redaction is key- and pattern-based, which is best-effort, not a guarantee. Log context routinely contains PII, credentials, tokens and customer data; sending it to a consumer chat platform is a security/privacy review item, not an engineering detail. This should be a hard gate before any production rollout.
  2. Package maturity. A single 1.0.0 release, single maintainer, no adoption history, no LTS or security-response commitment. Expect 1.x churn. Pin the version and review changelogs.
  3. Laravel version floor. Laravel 12.61+ is a narrow, recent patch-level constraint, which suggests a dependency on a specific framework feature or bugfix. Worth confirming why, because it may block teams on slightly older 12.x or 11.x.
  4. Telegram as a platform dependency. Consumer-grade availability, no SLA, and a bot cannot DM a user who has not started a conversation with it — an adoption gotcha if @username mention routing is expected to reach individuals who have never interacted with the bot.
  5. Alert-storm suppression semantics. A global 20/min default is a sensible protective cap, but under a real incident the cap decides which errors get through. Confirm that the dedup/grouping/rate-limit interaction preserves the highest-severity signal rather than letting a noisy lower-severity error consume the budget.

Key questions.

  • Who owns this internally, and is upstream's single-maintainer bus factor acceptable?
  • What log classification is permitted to leave our infrastructure, and does this pass vendor/DPA review?
  • Do we want production ERROR/CRITICAL flowing to a chat app alongside (or instead of) existing alerting such as Sentry or PagerDuty? Telegram is a notification surface, not a system of record — that has to be an explicit decision, not a default.
  • Which fallback channel receives 4xx failures, and is anyone monitoring it?
  • Is the sibling Discord logger already in production here, and can we reuse its runbook?
  • Dedicated queue or shared worker pool? What delivery lag is acceptable for an alert?
  • Has anyone reviewed the package source, and what is its test coverage?

Integration Approach

Stack fit. PHP 8.2+ and Laravel 12.61+/13 — fine for current-generation applications, excluding older LTS versions. No infrastructure prerequisites beyond a working queue and outbound HTTPS to api.telegram.org. This is an additive channel, not a replacement for existing log drivers, so it composes with whatever file/stderr/APM sinks are already in place.

Migration path. Greenfield addition; no data migration, no schema changes, no application code touched. The realistic path is a parallel-run pilot: add Telegram as a secondary channel for a subset of levels on one service, keep the incumbent alerting untouched, and only consider consolidation after the pilot proves signal quality and delivery reliability.

Compatibility. Composer-resolved, so upgrades are explicit. The external dependency to watch is Telegram's Bot API itself: it is versioned independently of the package, so a Telegram-side change could degrade behaviour without a corresponding package release. Treat that as a standing watch item rather than a one-time check.

Sequencing.

  1. Security/privacy review of log payloads and redaction rules — blocking gate.
  2. Provision a dedicated bot via BotFather and a dedicated chat or forum topic with locked-down membership; do not reuse the general engineering chat.
  3. Install into a non-production environment, configure env, run telegram-logger:test and --exception.
  4. Tune dedup window, grouping strategy, rate limits, per-level routing and silent levels against real staging traffic.
  5. Pilot on one production service at ERROR and above for roughly two weeks; measure volume, noise ratio, queue lag, and any dropped deliveries.
  6. Expand routing, write the runbook, assign an owner for redaction-rule upkeep, and only then evaluate retiring overlapping channels.

Operational Impact

Maintenance. Small code footprint, but a young package — pin the version and budget for upgrade review each minor. Config is published into the repository, so tuning is under our control. The durable maintenance cost is not the code: it is the redaction ruleset, which will silently rot as new fields appear in log context. Assign a named owner and schedule a periodic review.

Support. Expect GitHub-issues-only upstream support from a single maintainer. Internal support load will concentrate on "why didn't the alert arrive" triage, which requires the runbook to distinguish package, queue, and Telegram failures.

Scaling. The rate limiter caps chat traffic and protects against alert storms — the right default, with the caveat above about which errors survive the cap. Each oversized message costs two API calls (message + document reply), roughly doubling volume and consuming per-chat limits faster, so high-volume services should route to their own chat or topic rather than sharing one. The real scaling lever is queue worker capacity and backlog monitoring, not the package.

Failure modes.

  • 429 → waits retry_after; correct, at the cost of latency.
  • 5xx or unreachable → retry with backoff; a long Telegram outage eventually lands in the dead-letter path unless failed jobs are watched.
  • 4xx → fail fast and report Telegram's description to the fallback channel; if that channel is unmonitored, loss is silent.
  • Missing token or chat id → no-op by design; excellent for local dev, hazardous in production, where a misconfigured env produces silence indistinguishable from "no errors." Add a synthetic canary through telegram-logger:test on a schedule.
  • Bot removed from chat, chat deleted, bot blocked by a user → surfaces as 4xx; needs to be in the runbook.
  • Queue down or backlogged → alerting latency becomes unbounded and invisible.
  • Document upload failure → the message may still arrive but without the stacktrace, degrading exactly the incident where you need it most.

Ramp-up. Under a day for a competent Laravel engineer to install, configure and verify. The meaningful ramp-up is operational: on-call must understand that Telegram is a notification surface and where the authoritative record lives, and someone must own bot provisioning, chat membership and token rotation (tokens are masked in output, but the rotation procedure still needs to be written down before it is needed).

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.
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen