okvpn/datadog-symfony
Symfony bundle for Datadog observability. Configure DogStatsD metrics, APM tracing, and event/log forwarding from your Symfony app, with container integration and environment-based settings for production monitoring.
This release promotes the package (a DataDog StatsD/DogStatsD client integration, Symfony-DI-oriented) to a stable 1.0 major. Two changes matter: Symfony 7.0 support, and multi-client / multi-DSN configuration.
Architecture fit. The package's role is a thin, configuration-driven metrics emitter: a DSN string encapsulates transport (host/port), namespace, and default tags, and the DI layer hands application code a named client. Multi-client support is the significant architectural change — it lets one application route metrics to distinct destinations or namespaces (per-tenant, per-domain, per-team), and makes null:// and mock:// first-class sinks. "No metrics" and "captured metrics for assertions" become configuration concerns instead of code branches, which is a meaningful testability win. Caveat: this is a Symfony bundle, not a Laravel package, so architectural fit depends on whether we bridge through a service provider or use the underlying client directly and adopt only the DSN conventions.
Integration feasibility. Moderate-to-low effort. The config is a plain map of name → DSN, easy to represent in config/datadog.php with env overrides. The scheme-based DSN (datadog://host:port/namespace?tags=a,b) plus null:// and mock:// gives safe defaults out of the box, which is usually the hardest part to get right. The wire-up story for a non-Symfony container is not described in the release notes and must be proven in a spike.
Technical risk.
clients map. Existing config keys, service IDs, and default-client resolution must be re-verified; migration notes are absent.Key questions.
mock:// expose a retrievable metric buffer suitable for CI assertions?Stack fit. Assumes Laravel 10/11 on PHP 8.2+, with DataDog Agent 7.x reachable (sidecar/DaemonSet or localhost). DogStatsD protocol compatible; the package itself only needs container glue.
Migration path. Treat this as greenfield adoption of the DSN config model unless we are already on 0.x. If upgrading: inventory current config keys and every call site that fetches a client, translate to the clients map keyed by name (the default key appears significant), keep null:// for local/test, then diff emitted metric names and namespaces before/after using a mock sink.
Compatibility. Verify composer constraints resolve alongside our pinned Symfony components (console, http-foundation are commonly pulled by Laravel-adjacent packages), and confirm PHP 8.2/8.3 parity across CI and production.
Sequencing.
default plus per-domain or per-tenant as needed), env-driven DSNs, tags derived from env and app metadata.mock:// or null:// in the test environment with assertions on emitted metrics; add to CI.app.domain.metric) and a tag-cardinality budget before writing calls.Maintenance. Small, low-ceremony dependency with low ongoing cost. The real maintenance burden is our wrapper and naming convention, not the package. Pin the major and review on each release; 1.0 signals API stability.
Support. Community OSS, likely a small maintainer group with no vendor SLA. Mitigation: keep our used surface narrow (DSN config + named client) so swapping in the underlying DataDog client directly is a contained change.
Scaling. Emission is per-process UDP, so throughput scales with app instances; the agent is the aggregation point. Size agent resources and UDP buffers for peak metric rate, and run per-pod agents in Kubernetes to avoid cross-node hops. Multi-client multiplies emitted volume — budget for it, and for tag-cardinality cost, since DataDog bills on custom metrics × tag combinations.
Failure modes.
mock:// or null:// left in a production config → total observability blackout with no error. Add a boot-time config assertion.Ramp-up. Low for a PHP engineer: config-driven, the DSN is self-documenting, and the release notes show the multi-client shape. Roughly one day to a working spike, about a week to a tested, alerted, instrumented rollout for one domain. The genuine ramp-up cost is DataDog naming/tag conventions and cost governance, not the package API.
Recommendation. Adopt for evaluation via a timeboxed spike; approve for production once the Laravel bridge, mock-based CI assertions, and a "metrics stopped" alert exist. The Symfony-vs-Laravel mismatch and the missing 0.x → 1.0 migration notes are the two items to close before committing.
How can I help you explore Laravel packages today?