Download the PHP package minhyung/openobserve without Composer
On this page you can find all versions of the php package minhyung/openobserve. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package openobserve
php-openobserve
A PHP client for OpenObserve. Ships logs/metrics/traces, runs SQL searches, manages streams, and exposes the administrative APIs through a small, typed surface built on PSR-18 / PSR-17.
Installation
The library uses PSR-18 / PSR-17 HTTP abstractions and discovers an implementation at
runtime via php-http/discovery. If your project does not already ship one, install
Guzzle (or any other implementation) alongside:
Quick start
Email + password
Pre-encoded token
OpenObserve exposes a "Basic auth token" in the UI — a base64 blob of email:password
you can copy without re-encoding. Use Client::withToken():
The bound organization is the default for every resource accessor; pass an override
per call (e.g. $client->logs('other-org')) when you need to target a different one.
Log ingestion
Three endpoints are exposed via the Logs resource:
OpenTelemetry (OTLP/JSON)
Search
Streams management
Administrative resources
All follow the same CRUD shape: list, get, create, update, delete.
Monolog integration
handleBatch() is implemented so Monolog's buffering handlers (e.g.
BufferHandler, FingersCrossedHandler) send one HTTP request per flush.
Escape hatch
For endpoints not yet covered by a typed resource — or OpenObserve deployments whose URL shapes diverge from this library's defaults — drop down to the raw HTTP layer:
Both apply the configured base URL and Authorization header, decode JSON responses, and surface non-2xx responses as exceptions.
Errors
All library exceptions implement Minhyung\OpenObserve\Exception\OpenObserveException,
so you can catch them uniformly:
| Class | Trigger |
|---|---|
AuthenticationException |
HTTP 401 / 403 |
ApiException |
Any other 4xx / 5xx, with getStatusCode() and getResponseBody() |
TransportException |
PSR-18 client failure (network error, DNS, etc.) |
Requirements
- PHP 8.3+
- A PSR-18 HTTP client and PSR-17 message factories (autodiscovered via
php-http/discovery)
Development
Integration tests (optional)
A handful of integration tests live in tests/Integration/. They skip by default and
only run when you point them at a real OpenObserve instance through environment
variables:
Alternatively, copy phpunit.xml.dist to phpunit.xml (gitignored) and set the
<env> values there.
License
MIT
All versions of openobserve with dependencies
php-http/discovery Version ^1.17
psr/http-client-implementation Version *
psr/http-factory-implementation Version *