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

Api Logger Bundle Laravel Package

gamma/api-logger-bundle

A lightweight logging bundle for APIs that captures requests, responses, and errors for easier debugging and monitoring. Helps trace issues across endpoints with minimal setup in Laravel/PHP applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — verify before anything else. The package name (gamma/api-logger-bundle) and the "bundle" suffix point to a Symfony DI bundle, not a Laravel package. Laravel has no bundle concept — no Bundle class registration, no compiler passes, no Symfony kernel event subscribers. If the library hooks kernel.request / kernel.response / kernel.exception, none of that fires inside Laravel's HTTP kernel. The only realistic reuse path is via a framework-agnostic seam: a Guzzle middleware (outbound) and/or a PSR-3 logger. That seam has to be confirmed by reading the source, not the README — the README is a one-liner and tells us nothing about transport hooks, storage backend, or configuration surface.

Functional scope (as described). "REST API request logging and profiling" typically means: capture inbound/outbound request metadata (method, URI, status, duration), optionally bodies, and persist to a file/DB/queue for later analysis. That is a commodity capability in 2024 — Laravel Telescope, Clockwork, spatie/laravel-activitylog, Guzzle log middleware, and OpenTelemetry PHP all cover it with maintained code. The package has to justify itself against free, first-party alternatives.

Integration feasibility: low to medium, and gated on an audit. Three discrete questions determine everything:

  1. Is the logging core separable from Symfony's container/event system?
  2. Does composer.json allow PHP 8.x and Guzzle 7, or is it pinned to php: ^7.0 / symfony/*: ^3|^4 / Guzzle 6? A Guzzle 6→7 ClientInterface signature change alone can break middleware silently or fatally.
  3. What is the license, and does it permit the fork-and-vendor work this will require?

Technical risk — high, and concentrated in three areas.

  • Abandonment. Last release 2018-07-15, ~7 years stale. Zero stars, zero dependents, zero public validation. There is no signal that this code has ever run in a production Laravel app. A score of 0.09 is consistent with a personal/experimental repo, not a maintained dependency.
  • PHP 8 incompatibility. Code of this vintage predates typed properties, union types, and the deprecations that became fatals in 8.x. Expect mcrypt, create_function, dynamic property deprecations, and untyped ArrayAccess return signatures to surface during a trial install.
  • Data-handling exposure. A request logger that captures bodies and headers by default will capture Authorization tokens, cookies, passwords, and PII. With no security-response process and no maintainer, any vulnerability is permanently yours. This is a GDPR/PCI conversation before it is an engineering one.

Key questions to put to the repo before committing engineer time: What does composer.json actually constrain? Is there a test suite and CI? Does it log bodies by default, and is there a redaction/allow-list mechanism? Where does it write — synchronous DB insert, file append, or queue? Is there sampling? Is the Symfony coupling in the core or only in the bundle wrapper? Is there a tagged release artifact, or only dev-master?

Integration Approach

Stack fit. Target is presumably Laravel 10/11 on PHP 8.2/8.3. On the current evidence this package does not "fit" that stack — it would need to be adopted, not installed. Treat the Composer dependency as unavailable until an install spike proves otherwise; --ignore-platform-reqs is not a production strategy.

The one viable path: fork-and-vendor. Assume no composer require success. Plan for:

  • Fork to an internal namespace, pin to a specific commit SHA (there may be no tag to pin to), and register via a path or VCS repository so the dependency is immutable and reviewable.
  • Extract, don't adopt, the core. If a Guzzle middleware exists, lift it into a first-party package — Laravel's Http facade is Guzzle-backed, so outbound instrumentation ports cleanly and is the highest-value, lowest-risk seam. Discard the Symfony bundle class, DI extension, and compiler passes entirely.
  • Build the Laravel-native shell yourself. Inbound timing belongs in a middleware pair (start timestamp on the way in, log on the way out); use terminable middleware so the write happens after the response is flushed. Outbound belongs in a Http::globalMiddleware() or a Guzzle handler-stack push. Configuration belongs in a publishable config/api-logger.php with env-driven toggles and a sampling rate.
  • Storage is your decision, not theirs. Default to a queue-backed write (Redis/SQS) into a dedicated table or log sink, with a retention/TTL job. Do not inherit a synchronous per-request DB insert.

Compatibility work is non-trivial and front-loaded. Expect to spend the majority of effort on PHP 8 uplift and on replacing whatever logging abstraction the package assumes with PSR-3 / Laravel's Log facade.

Sequencing (two-week gate before any production commitment):

  1. Day 1–2 — Audit. Read source, license, composer.json, tests. Confirm whether a Guzzle or PSR-3 seam exists. If there is no clean seam, stop.
  2. Day 3–5 — Install spike on a throwaway branch against the real Laravel version. Record every error verbatim.
  3. Day 6–8 — Build-vs-fork decision. Benchmark against Laravel Telescope and OpenTelemetry PHP on a scored rubric: coverage of the requirement, maintenance burden, data-redaction controls, and time-to-value. Given the alternatives, this package needs to win on something specific — most likely a narrow profiling format the team has standardized on — or the decision should be to build first-party.
  4. Week 2 — Adapter + tests. If proceeding, write the Laravel adapter, backfill characterization tests around the forked core, and add redaction tests specifically.
  5. Post-gate — Staging canary with sampling at 100% for one week, then dial to 1–5% in production.

Operational Impact

Maintenance — you are the maintainer from day one. There is no upstream to defer to: no release cadence, no issue triage, no one to escalate a CVE to. Budget a standing allocation (realistically 2–4 engineer-days per quarter) for PHP/Laravel upgrade compatibility and dependency bumps, plus the unplanned spike the next major Laravel release will cause. Assign a named code owner and record the fork SHA in the repo — "where did this come from and why" is the question that gets asked two years from now.

Support. Zero stars and zero dependents means zero community: no Stack Overflow answers, no blog posts, no one who has debugged this before. Onboarding is entirely internal documentation, and the team inheriting it will be reading unfamiliar code with no reference material. A short runbook (where logs go, how to disable, how to rotate, what the sampling knob does) is not optional — it is the mitigation for the bus-factor risk.

Scaling — this is a cost center that grows with traffic, not with value.

  • Latency: middleware on every request and every outbound call, even if small, is multiplied across the whole surface. Under sampling you get the value; at 100% you pay for it everywhere.
  • Write amplification: per-request persistence turns a read-heavy service into a write-heavy one. Estimate log rows/day × row width and size storage and retention before rollout, not after the table pages the on-call engineer.
  • Volume: full request/response bodies multiply row size by 10–100×. Body capture must be opt-in, sampled, and truncated.

Failure modes to design against explicitly:

  • Logger throws, request 500s. The instrumentation must be fail-open: catch and swallow everything, log to a fallback, never propagate. Any shared dependency on the request path is a liability.
  • PII/secret leakage. Tokens, cookies, and passwords end up in a log store with different access controls than the database. Redaction allow-lists and a retention policy are part of the integration, not a follow-up ticket.
  • Log injection. Unsanitized headers written to a line-based sink allow forged log entries. Structured (JSON) output is the mitigation.
  • Silent overhead. Profiling code that fails closed on an exception can cost latency invisibly for months. Add a metric on the instrumentation's own error rate.
  • Upgrade breakage. Next PHP or Laravel major lands with no upstream fix. Assume you patch it yourself.

Ramp-up. The code volume is likely small, so reading it is fast — but with no documentation, no tests, and no community, the ramp-up cost is concentrated in reverse-engineering intent and in the fork's provenance. Plan for one engineer-day of documentation before handoff.

Recommendation. Do not adopt this as a dependency. Run the two-day audit; if a clean Guzzle or PSR-3 seam exists, treat the package as reference source and reimplement the needed behavior as a first-party, tested, redaction-aware component. If no clean seam exists, close it out and adopt Telescope or OpenTelemetry PHP instead. The abandoned upstream, absent community, and 2018-era PHP constraints are not risks to be managed — they are the entire profile of the package, and the build-vs-fork calculus favors build.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource