Download the PHP package konzume/splunk-observability-sdk without Composer

On this page you can find all versions of the php package konzume/splunk-observability-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package splunk-observability-sdk

Splunk Observability SDK for Laravel

A production-grade, fully asynchronous observability SDK for Laravel 13. Captures HTTP requests, database queries, exceptions, queue jobs and custom application events, batches them in-memory, and ships them to Splunk's HTTP Event Collector (HEC) from a queue worker — never on the request thread.

Designed to be a drop-in alternative to Sentry Performance / Datadog APM / New Relic / Bugsnag for teams that already operate Splunk.

Why an async pipeline

Telemetry SDKs that synchronously call out to a SaaS during a request can spike p99 latency by hundreds of milliseconds whenever the SaaS slows down or drops a packet. This package guarantees zero impact on response time by:

  1. Collecting every signal in an in-memory request-scoped context.
  2. Running the heavy serialization + queue dispatch in Laravel's terminate() phase — i.e. after the response has been sent to the client.
  3. Doing all Splunk HTTP I/O on a separate queue worker, with retries and exponential backoff handled by Laravel's queue layer.

Features

Installation

The package auto-discovers — no manual provider registration needed.

Publish the config:

This creates config/splunk-observability.php.

Register the middleware (required, Laravel 11+)

The SDK ships a single global middleware that owns the request lifecycle. You must register it in bootstrap/app.php — auto-discovery alone is not enough on the Laravel 11+ skeleton, and the middleware should run first so it wraps every other middleware (including auth, CORS, and exception handling). Use prepend:

Why prepend and not append?

This mirrors how Sentry's tracing, Datadog APM and New Relic install their request span — first in, last out.

Environment variables

Minimum config:

For local dev, set SPLUNK_OBS_EXPORTER=null to discard everything.

Architecture

Usage

Custom events:

Setting the tenant / user context manually if you don't use auth:

Correlated logs (the splunk channel)

The SDK auto-registers a splunk log channel. Anything you write to it is buffered into the current request and shipped — correlated by trace_id — alongside the request, its queries, HTTP calls and mail. Search one trace_id in Splunk and you see the whole story.

To mirror every application log into Splunk, add splunk to your stack in config/logging.php:

Log context arrays are run through the same sanitizer as request payloads (so password, token, etc. are redacted). Levels below SPLUNK_OBS_LOG_LEVEL (default debug) are dropped.

Logs are buffered and flushed at the end of the request. A hard fatal (OOM, segfault) before terminate() loses the buffer — for guaranteed delivery of a critical line, also write it to a durable channel (file/stderr) via a stack.

Outbound HTTP capture

Every call made with Laravel's HTTP client is captured automatically — no code changes:

URLs are always sanitized (userinfo stripped, sensitive query params filtered). Headers and bodies are off by default — enable with SPLUNK_OBS_HTTP_CAPTURE_HEADERS=true / SPLUNK_OBS_HTTP_CAPTURE_BODIES=true only on trusted indexes. The SDK's own export to Splunk uses Guzzle directly, so it is never captured (no recursion).

Mail capture

Every email the app sends is captured (subject, recipients, mailer, attachment count — never the body):

Performance impact

The middleware's handle() phase only resets the context and reads request headers — measured at <0.5ms on a small Laravel API. All heavy work (sanitization, JSON serialization, queue push) happens in terminate(), after the client has the response. There is no synchronous HTTP I/O on the request thread.

Sampling

Sampling is deterministic on the trace id, so a trace that gets sampled in at the request level keeps all its child events.

Documentation

Testing

Suite layout:

Extending — custom exporter

Implement src/Contracts/Exporter.php and bind it:

The export pipeline is exporter-agnostic — no other code changes are needed.


All versions of splunk-observability-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
ext-zlib Version *
guzzlehttp/guzzle Version ^7.8
illuminate/contracts Version ^13.0
illuminate/database Version ^13.0
illuminate/http Version ^13.0
illuminate/queue Version ^13.0
illuminate/support Version ^13.0
ramsey/uuid Version ^4.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package konzume/splunk-observability-sdk contains the following files

Loading the files please wait ...