Skip to content

Releases: cboxdk/laravel-telemetry

v0.1.0-alpha.3 — dashboard fixes (logs 400, env/host filters)

Choose a tag to compare

@sylvesterdamgaard sylvesterdamgaard released this 03 Jul 12:13

Third alpha — dashboard fixes.

Fixed

  • Logs dashboards returned HTTP 400. Loki rejects a stream selector that can match the empty string ({service_name=~".*"}); the template "All" value is now .+ (valid in both Loki and Prometheus).

Added

  • $environment and $host filters across the whole dashboard suite. $environment (deployment_environment_name) separates the same service across prod/staging/…; $host (host_name) breaks down the otherwise-aggregated fleet. Both thread through every metric and trace query, and the overview gains a "Fleet" row (requests by environment, by host). The Requests dashboard's domain filter was renamed $host$domain.
  • Self-identifying Prometheus scrape endpoint — every scraped series is now stamped with the resource identity (service_name, service_namespace, deployment_environment_name, host_name), so a single Prometheus scraping many apps/hosts can tell them apart (matching what OTLP push carries). Churny attrs (deploy id, version) are left off.

Upgrade is drop-in from alpha.2 — re-import the bundled dashboards (telemetry:dashboards) or let file-provisioning reload them.

Full changelog: CHANGELOG.md

v0.1.0-alpha.2 — env standardization + OTLP token

Choose a tag to compare

@sylvesterdamgaard sylvesterdamgaard released this 03 Jul 09:57

Second alpha. Env-var naming standardization + first-class OTLP auth. Breaking vs alpha.1 (expected during alpha — update your .env keys).

Added

  • TELEMETRY_OTLP_TOKEN — bearer token for an auth-gated OTLP endpoint (e.g. a shared collector), sent as Authorization: Bearer <token>. No more hand-wiring the headers array. Arbitrary headers also via the OTel-standard OTEL_EXPORTER_OTLP_HEADERS.

Changed — env vars standardized

Every variable is now TELEMETRY_-prefixed and mirrors its config path. Rename map:

alpha.1 alpha.2
OTEL_EXPORTER_OTLP_ENDPOINT (primary) TELEMETRY_OTLP_ENDPOINT (OTEL still honored as fallback)
TELEMETRY_ENVIRONMENT TELEMETRY_SERVICE_ENVIRONMENT
TELEMETRY_DEPLOYMENT TELEMETRY_SERVICE_DEPLOYMENT
TELEMETRY_TRACE_DETAILS TELEMETRY_TRACES_DETAILS
TELEMETRY_TRACE_RESPONSE_HEADER TELEMETRY_TRACES_RESPONSE_HEADER
TELEMETRY_SLOW_REQUEST_MS TELEMETRY_TRACES_SLOW_REQUEST_MS
TELEMETRY_SLOW_SPAN_MS TELEMETRY_TRACES_SLOW_SPAN_MS
TELEMETRY_SPOOL_{CONNECTION,KEY,MAX_ITEMS} TELEMETRY_OTLP_SPOOL_*
TELEMETRY_QUERIES_MIN_DURATION TELEMETRY_INSTRUMENT_QUERIES_MIN_DURATION

OpenTelemetry-standard vars (OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES) are honored as fallbacks; TELEMETRY_* wins when both are set.

Full changelog: CHANGELOG.md

v0.1.0-alpha.1 — first public alpha

Pre-release

Choose a tag to compare

@sylvesterdamgaard sylvesterdamgaard released this 03 Jul 07:40

First public release — alpha. The public API may still change before the 1.0 stability guarantee, but the core is feature-complete and covered by 249 tests.

Collector-free telemetry for Laravel: Prometheus metrics, OTLP traces and structured events/logs from a plain Composer package. No C extension, no OTel SDK, no protobuf, no sidecar. Metrics work under shared-nothing FPM because state lives in a shared store (Redis/APCu), not the PHP process.

Highlights

  • Metrics — counters, push/observable gauges and histograms over a shared store (Redis / APCu / array), scraped at /telemetry/metrics or pushed via OTLP.
  • Tracing — automatic spans for requests, queue jobs, DB queries & transactions, commands, scheduled tasks, views, cache, outgoing HTTP and Redis, with full W3C traceparent propagation into queued jobs. Per-span CPU/memory attribution.
  • Events & logs — structured events and a telemetry log channel exported as trace-correlated OTLP log records.
  • Redaction engine — every attribute, exception message and log record passes one choke point before export; key- and pattern-based scrubbing (JWTs, credentials, url userinfo) plus a custom hook.
  • The trace id as a support referenceX-Trace-Id response header, trace_id in Laravel Context (Sentry/Flare/logs pick it up), and error-page correlation.
  • Container/k8s/cloud resource detection and self-observability metrics (the package reports on its own export health).
  • 13 bundled Grafana dashboards (APM-style), importable with telemetry:dashboards.
  • High-traffic mode — a Redis spool + telemetry:flush --daemon for sub-second span shipping.
  • Octane-safe (Swoole / RoadRunner / FrankenPHP). Telemetry never throws into your app.

Requirements

PHP ^8.3–8.5, Laravel ^12/^13. Redis recommended for the metric store (APCu or array also supported).

Install

composer require cboxdk/laravel-telemetry:^0.1.0-alpha.1

See the documentation to get started, and the local LGTM stack cookbook to see your first trace in a minute.

Feedback

This is an alpha — bug reports and API feedback are very welcome via issues.

Full changelog: CHANGELOG.md