christian98/datadog-laravel
christian98/datadog-laravel integrates Laravel applications with Datadog, forwarding logs, metrics, and traces to your Datadog account. It ships a service provider, configurable handlers, and helpers for quick, low-effort observability setup.
Architecture fit. christian98/datadog-laravel positions itself as a thin Laravel integration layer over Datadog's official PHP SDK — the expected shape is a service provider, a publishable config file, a facade/DI binding, and convenience wrappers for the underlying client. That is architecturally idiomatic for Laravel and low-risk in principle: it should slot in beside the framework's existing telemetry surfaces (Monolog handlers, Illuminate\Contracts\Debug\ExceptionHandler, queue events, HTTP middleware) rather than replacing them. The fit question is not whether Laravel can host it — it can — but whether a wrapper adds enough value over binding the official Datadog client directly in AppServiceProvider. For most teams the wrapper saves perhaps 50–150 lines of boilerplate; it does not change the observability topology.
Integration feasibility. Mechanically straightforward: Composer install, register the provider (or rely on package discovery), publish config, set environment variables (DD_API_KEY, DD_APP_KEY, DD_SITE, DD_ENV, DD_SERVICE, DD_VERSION), and inject the client where needed. The real feasibility gate is the upstream SDK it depends on — which official client it wraps (the API client datadog/datadog-api-client-php, the StatsD client datadog/php-datadogstatsd, or the tracer), which version constraint it pins, and whether that constraint is compatible with our Laravel and PHP versions. Because the repository is on GitLab with zero stars, zero dependents, and a score of 0, we cannot infer quality from ecosystem signals. Feasibility must be established by a timeboxed spike (roughly 1–2 engineer-days) that installs it in a scratch application, exercises the primary API surface, and audits the provider's boot/register lifecycle for anything that fires on every request.
Technical risk.
php artisan config:cache) is respected.Key questions.
Recommendation: Treat as do-not-adopt-by-default. Run the spike only if the wrapper demonstrably covers a surface we need beyond what a 100-line internal service provider would give us. Otherwise, bind the official SDK ourselves.
Stack fit. The package assumes a conventional Laravel application: Composer, service container, config repository, package discovery. It should be compatible with any recent Laravel major if the pinned SDK and PHP constraints line up. Two areas need explicit verification: (a) interaction with config:cache and route:cache in deployment, and (b) behavior under Octane or long-running workers, where a provider that captures state at boot or holds a non-reset client can leak configuration or accumulate buffers across requests. If we run queued jobs or Horizon, confirm the client is safe to reuse in a forked worker.
Migration path. There is nothing to migrate from unless we already emit Datadog telemetry through hand-rolled cURL calls or a Monolog handler — in which case the sequencing below stands. In the more likely case, this is a greenfield integration where the "migration" is really an adoption decision. The low-cost path is to build the internal binding first (a DatadogServiceProvider that constructs the official client from config/services.php), measure whether it is genuinely insufficient, and only then consider the package as a replacement. Because the wrapper's abstraction is shallow, swapping either direction later is a contained refactor of a single provider and its injection sites.
Compatibility. Enumerate the matrix before committing: PHP version (including 8.2/8.3 deprecation surface), Laravel major, the pinned Datadog SDK major, and the deployment runtime (FPM vs Octane vs Lambda via Bref). Pay particular attention to PHP 8.x deprecation notices — an unmaintained wrapper on a modern runtime will emit warnings that pollute logs. Confirm the package does not conflict with datadog/dd-trace-php (the APM extension), which many teams install independently; two telemetry paths with overlapping global state is a common source of confusing behavior.
Sequencing.
config:cache and, if applicable, Octane.Treat steps 1–3 as a strict timebox. The expected outcome of a package with zero dependents and a score of 0 is a "no" — the spike exists to make that "no" defensible, not to justify adoption.
Maintenance. This is the dominant cost. With a single maintainer and no downstream dependents, we should assume we are the de facto maintainers. Budget for: keeping the upstream SDK's breaking changes absorbed, Laravel major-version bumps, PHP minor-version deprecations, and security patching of transitive dependencies. A realistic steady-state estimate is 1–3 engineer-days per year in the good case, and a forced internal fork in the bad case. Mitigations: pin the version exactly, vendor the source into our monorepo if the license allows, and record an owner on the platform/infra team rather than leaving it orphaned in an application repo.
Support. There is no vendor support and effectively no community support surface (GitLab-hosted, no stars, no dependents means no Stack Overflow corpus, no blog posts, no one else hitting the same bugs). Escalation is "read the source" — acceptable for a 200-line wrapper, unacceptable for anything that touches the request path or credentials. Contrast this with Datadog's own SDKs, which have vendor-backed issue trackers and documented deprecation policy. Our internal support model should be: named owner, an ADR explaining why the dependency exists, and a documented fallback to the direct SDK binding.
Scaling. Telemetry volume scales with request volume, so this is a cost and backpressure question more than a throughput question. Verify: whether metric submission is batched/async or synchronous per-call; what the client-side buffer bound is; whether it respects sampling and rate limits; and what happens to p99 latency at peak if Datadog's intake is slow. A synchronous call to a third-party API inside a request is an unacceptable latency dependency. If the wrapper offers event or metric submission but not APM tracing, be explicit that this is not a substitute for dd-trace-php and budget the two separately. Also confirm cardinality discipline — a wrapper that makes it one line to tag by user ID is a wrapper that makes it one line to blow up our custom-metrics bill.
Failure modes. Rank by likelihood × blast radius:
dd-trace-php producing double-counted metrics. Mitigation: pick one path per signal type and document it.Ramp-up. Low for engineers — the abstraction mirrors Datadog's SDK, so anyone who has used the official PHP client is productive in under a day. The non-trivial ramp-up is organizational: on-call needs to know that a telemetry outage looks like "no data" rather than "red dashboard," and whoever owns it needs enough Datadog SDK familiarity to patch a fork. Budget roughly half a day of platform-team onboarding plus the ADR. The overall recommendation, restated: the integration is easy, the ownership is not — adopt only with a named owner and an exit plan, or skip the wrapper and bind the official SDK ourselves.
How can I help you explore Laravel packages today?