changole/otel-logging
OpenTelemetry logging for Laravel. Add an OTLP log channel to Laravel’s logging stack so application logs flow to OpenTelemetry collectors and compatible backends, with structured context and trace correlation for easier observability.
Category and architecture fit
changelo/otel-logging positions itself as a Laravel logging channel that bridges Monolog → OpenTelemetry Logs → OTLP. Laravel's LogManager has a first-class extension point for this (Log::extend or a custom channel driver referenced from config/logging.php), so the integration surface is idiomatic and low-friction. The package slots in as one more channel inside a stack, meaning it can coexist with single/daily/stderr rather than replacing them.
The architectural value hinges on one thing: does it inject trace_id/span_id from the active OTel span into each log record? Without that, it is a generic log shipper with an OTLP transport, and the collector's filelog receiver or an existing vendor agent does the same job with zero application code. With it, logs become first-class correlated telemetry alongside traces — that is the actual product.
Integration feasibility
The happy path is small: composer require, publish config, add a channel entry, flip LOG_CHANNEL/LOG_STACK. A competent Laravel engineer can produce a working staging demo in under a day. The real programme effort is not the package — it is standing up the collector, defining resource attributes (service.name, deployment.environment), and modelling ingest cost downstream.
Technical risk
| Risk | Severity | Notes |
|---|---|---|
License NOASSERTION |
Blocker | No declared license means no legal right to use, modify, or redistribute in a commercial codebase. Must be resolved before evaluation continues. |
| OTel PHP Logs signal maturity | High | The PHP SDK's logs support has historically lagged traces/metrics. Verify the pinned SDK version and whether it is still flagged experimental. |
| Bus factor = 1 | High | 5 stars, 0 dependents, single maintainer, no visible release cadence. Effectively an unmaintained-in-waiting dependency. |
| Monolog major-version drift | Medium | Confirm Monolog 3.x support; Laravel 11+ ships Monolog 3 and will break Monolog 2-only handlers. |
| Blocking export on the request path | Medium | Synchronous OTLP HTTP export adds collector round-trip latency to every request unless batched or deferred to shutdown. |
| No community validation | Medium | Zero dependents means no field evidence for Octane, Horizon, or high-volume queue workers. |
Key questions for the maintainer / code review
open-telemetry/* packages and versions are pinned? Is the logs SDK still experimental?terminating? What happens on collector timeout?context array serialisation?Stack fit
Target Laravel 10/11/12 on PHP 8.2+, Monolog 3, PSR-3. Confirm whether the transport is OTLP/HTTP+protobuf (portable, no ext-grpc) or gRPC (requires the PHP extension and is a common deployment blocker). Prefer HTTP/protobuf for platform consistency.
Build vs. buy comparators (evaluate before committing)
| Option | Trade-off |
|---|---|
Official open-telemetry/opentelemetry-logger-monolog |
Community-maintained Monolog handler; likely what this package wraps. Prefer the upstream if it covers the need. |
keepsuit/laravel-opentelemetry |
Broader Laravel auto-instrumentation; logs + traces from one dependency, better maintained. |
Collector filelog receiver on existing daily logs |
Zero application change; loses trace correlation unless log format is enriched. |
| Vendor agent (Datadog/New Relic) | Commercial, but removes the OSS maintenance burden entirely. |
If the package is a thin wrapper over the official handler, adopt upstream directly and avoid the bus-factor-1 dependency.
Migration path and sequencing
memory_limiter → batch → OTLP exporter to the chosen backend. Logs are worthless without this; do not start with the app.service.name / deployment.environment resource attributes. Logs inherit correlation from spans; doing logs first wastes the exercise.stack alongside the existing file channel on one service. Compare fidelity, latency delta, and volume against baseline for two weeks.LOG_STACK=stack,daily,otlp), keeping the file channel as local fallback.Compatibility gates
Lock the package to an exact version; verify illuminate/support and monolog/monolog constraints resolve against the app's composer.lock before rollout. Test explicitly under Octane and a Horizon worker — those are where PHP request-scoped assumptions break.
Maintenance Assume a fork-and-own posture. With a single maintainer, no dependents, and no visible release process, the realistic outcome is that your platform team vendors the package or patches it in-tree. Budget for that explicitly rather than discovering it at the first Laravel major upgrade. Pin exact versions and add a Renovate/Dependabot exclusion with a manual review cadence.
Support No commercial support, no SLA, no community Slack. Ownership must be assigned to a named platform engineer. Write a runbook covering: how to disable the channel, how to verify export health, and how to reconcile against the backend.
Scaling Log volume is typically one to three orders of magnitude larger than trace volume. This is the dominant cost driver, and it is easy to underestimate:
memory_limiter and batch processors are mandatory; without them a single verbose service can OOM the collector.LOG_LEVEL=warning in production actually suppresses debug egress. There is no meaningful sampling story for logs — unlike traces, you cannot probabilistically drop error records.Failure modes to design around
terminating.stack while a vendor agent is also shipping stdout silently doubles cost.sending_queue limits and dropping policies deliberately.Ramp-up Platform team: ~2–3 sprints to cover collector deployment, resource-attribute standards, backend cost modelling, and the runbook. Application teams: ~half a day each for channel configuration and semantic-convention basics. The learning curve is not Laravel — it is OpenTelemetry resource semantics and collector operations. Plan a brown-bag session before Phase 3.
Recommendation
Do not adopt as-is. The NOASSERTION license is a hard gate, and at 5 stars with zero dependents and a single maintainer the maintenance burden almost certainly exceeds the configuration it saves. Treat this package as a reference implementation: read it to understand the Laravel channel wiring, then build on open-telemetry/opentelemetry-logger-monolog or keepsuit/laravel-opentelemetry, or short-circuit the whole question with a collector filelog receiver. Revisit only if the license is clarified and the package demonstrates trace-context injection plus active maintenance.
How can I help you explore Laravel packages today?