pod-point/laravel-monolog-kinesis
Monolog handler for Laravel that streams application logs to AWS Kinesis. Configure it as a logging channel to ship structured log records to a Kinesis stream for centralised collection and downstream processing.
Architecture fit. laravel-monolog-kinesis sits at the seam between Laravel's logging subsystem and AWS Kinesis, implementing a Monolog handler registered as a Laravel log channel. That is an architecturally low-coupling position: logging is a cross-cutting concern, adoption is per-channel and reversible, and no application code needs to change. The package's value proposition is the AWS-native log pipeline — Kinesis → Firehose → S3/Redshift/OpenSearch — which appeals to teams already standardized on AWS that want structured logs queryable alongside other event data, rather than CloudWatch Logs as the terminal sink. The fit is strongest for event-driven or AWS-native estates; it is a poor fit for teams without Kinesis operational maturity, since the package introduces a stateful, metered, capacity-planned dependency into the logging path.
Integration feasibility. This release is small and additive, and materially improves deployability. Three changes:
Both functional changes are opt-in and configuration-level, so integration is a config exercise, not an application change.
Technical risk. Moderate, and mostly inherent to the pattern rather than to this release.
PutRecords call in the request path adds latency and creates a dependency on AWS API availability. Whether failures are swallowed, retried, or propagated is the single most important behavioral question and is not answered by these notes.Key questions.
PutRecords per log record? What is the flush/retry behavior, and what is the partition key strategy (a constant or request-ID key will hot-shard)?Stack fit. Standard Laravel: Composer install, add a kinesis channel to config/logging.php, set stack channels to fan out to it. The custom formatter is configured through the channel's formatter options, so adopting JSON output is a per-environment config toggle — a clean way to stage the change. Null-credential support means the AWS SDK default provider chain (env vars → shared config → IRSA/ECS/EC2 role) is now usable end to end, removing static secrets from the config surface.
Migration path. Treat this as a patch-level bump. From 4.0.1, both functional changes are additive and opt-in; no config rewrite is implied. From 3.x, assume a major-version break and require an explicit upgrade review — the release notes do not cover it, and the deletion of CHANGELOG.md removes the easiest historical diff. Any internal tooling, SBOM job, or dependency-review automation that parses CHANGELOG.md will silently produce stale output and must be repointed at the GitHub Releases API or feed.
Compatibility. Verify before merging: Laravel and Monolog major version alignment (the formatter interface is Monolog-version-sensitive), PHP version floor, and that a chosen formatter (e.g. Logstash/ECS JSON) composes with Laravel's formatter/formatter_with channel keys rather than requiring a custom channel class. Confirm the package does not pin aws/aws-sdk-php in a way that conflicts with the rest of the estate.
Sequencing.
CHANGELOG.md.null, and validate the default provider chain resolves — one service, one environment, before fleet-wide.Maintenance. Low ongoing effort for consumers — the integration is a config block, and the package's API surface is small. The maintenance burden sits with the upstream project: a small maintainer group and infrequent releases mean security patches for transitive AWS SDK dependencies may lag. Because the changelog now lives only in GitHub Releases, add the repo's release feed to dependency monitoring rather than relying on the repo's file tree.
Support. Community-supported only; no vendor SLA. For a logging-critical dependency this argues for a designated internal owner, a pinned version, and an acknowledged exit path (swap the channel to a maintained handler — the abstraction makes this a contained change). Worth documenting explicitly so the fallback is a decision, not a scramble.
Scaling. The package inherits Kinesis's constraints: per-shard write limits (1 MB/s or 1,000 records/s), a 1 MB per-record ceiling, and per-PUT pricing that penalizes unbatched writes. Log volume scales with traffic and spikes during incidents, so capacity planning must assume peak, not average. Recommended: batch where possible, avoid low-cardinality partition keys to prevent hot shards, consider Kinesis Data Firehose as the buffer in front of the storage layer, and apply sampling or level-based routing for debug/verbose channels so production log volume is not driven by development verbosity. Cost should be modeled per GB ingested plus PUT count, not per service.
Failure modes.
ProvisionedThroughputExceeded during traffic spikes — the failure correlates with incidents, so log loss occurs precisely when diagnostics matter most.Each of these needs a documented expected behavior (drop vs. throw) and an alert on absent logs — a dead-letter or volume-based monitor is the practical mitigation, since the application itself will not report the loss.
Ramp-up. Low for Laravel developers (config-only integration, roughly half a day to a working channel). Moderate for the platform/IAM side: role attachment, Kinesis stream provisioning and shard sizing, Firehose configuration, and cost ownership. Budget real effort for the observability side — schema agreement with downstream consumers and an alerting story for log-pipeline health — as that, not the Composer install, is where the schedule risk lives.
How can I help you explore Laravel packages today?