PHPackages                             minhyung/monolog-openobserve - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. minhyung/monolog-openobserve

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

minhyung/monolog-openobserve
============================

Monolog handler for OpenObserve

0.2.0(4w ago)01.8k↓78.8%1MITPHPPHP &gt;=8.3CI passing

Since Sep 10Pushed 2w ago1 watchersCompare

[ Source](https://github.com/overworks/monolog-openobserve)[ Packagist](https://packagist.org/packages/minhyung/monolog-openobserve)[ RSS](/packages/minhyung-monolog-openobserve/feed)WikiDiscussions 0.x Synced 2w ago

READMEChangelogDependencies (7)Versions (7)Used By (0)

monolog-openobserve
===================

[](#monolog-openobserve)

[![CI](https://github.com/overworks/monolog-openobserve/actions/workflows/php.yml/badge.svg?branch=0.x)](https://github.com/overworks/monolog-openobserve/actions/workflows/php.yml)[![Latest Version](https://camo.githubusercontent.com/144a0b0570a6aa63d74ddc4f41dad3bb87c3541e4121514c0d47d270c8c97de3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696e6879756e672f6d6f6e6f6c6f672d6f70656e6f6273657276652e737667)](https://packagist.org/packages/minhyung/monolog-openobserve)[![PHP Version](https://camo.githubusercontent.com/08480a3848ec77f30ea4561c30ea6f39cf66df4e5790a30beb3dcc0ba3ec2a61/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d696e6879756e672f6d6f6e6f6c6f672d6f70656e6f6273657276652e737667)](https://packagist.org/packages/minhyung/monolog-openobserve)[![Total Downloads](https://camo.githubusercontent.com/ed8a5b15c0e007526a9c8010a28bd93c0827b0f3536d96a76cc64177f401a344/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d696e6879756e672f6d6f6e6f6c6f672d6f70656e6f6273657276652e737667)](https://packagist.org/packages/minhyung/monolog-openobserve)[![License](https://camo.githubusercontent.com/5710fa87a940b3b36d611b89bf0118e6526d0c9fe2b08d6ab03a26f18db35a4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d696e6879756e672f6d6f6e6f6c6f672d6f70656e6f6273657276652e737667)](LICENSE)

Monolog handler for [OpenObserve](https://openobserve.ai/)

Requirements
------------

[](#requirements)

- PHP 8.3 or later
- the `curl` extension
- Monolog 3

Installation
------------

[](#installation)

```
composer require minhyung/monolog-openobserve
```

Usage
-----

[](#usage)

```
use Minhyung\Monolog\OpenObserveHandler;
use Monolog\Logger;

$handler = new OpenObserveHandler(
	host: 'http://localhost:5080',
	organizationId: 'default',
	streamName: 'monolog',
	username: 'admin@yourdomain.com',
	password: 'yourpassword',
);

$logger = new Logger('app');
$logger->pushHandler($handler);

$logger->info('Hello OpenObserve!', ['foo' => 'bar']);
```

Handling failures
-----------------

[](#handling-failures)

By default the handler throws when OpenObserve cannot be reached or rejects the request, including on an authentication failure such as `401`. Set `ignoreFailure: true` to swallow those errors so that a logging problem never breaks the application:

```
$handler = new OpenObserveHandler(
	host: 'http://localhost:5080',
	organizationId: 'default',
	streamName: 'monolog',
	username: 'admin@yourdomain.com',
	password: 'yourpassword',
	ignoreFailure: true,
);
```

Swallowed failures disappear silently. To keep a record of them, pass a `fallbackLogger` — any PSR-3 logger — and every ignored failure is reported to it at error level, with the original exception under the `exception` context key:

```
use Monolog\Handler\ErrorLogHandler;

$handler = new OpenObserveHandler(
	host: 'http://localhost:5080',
	organizationId: 'default',
	streamName: 'monolog',
	username: 'admin@yourdomain.com',
	password: 'yourpassword',
	ignoreFailure: true,
	fallbackLogger: new Logger('openobserve', [new ErrorLogHandler()]),
);
```

The fallback logger must not write back to this handler, as that would recurse. It is only consulted while `ignoreFailure` is on; when the handler rethrows, the caller already sees the exception.

Timeouts
--------

[](#timeouts)

Because a stalled or unreachable OpenObserve would otherwise block the application on every log call, the request is bounded by two timeouts: 2 seconds to connect and 5 seconds for the whole request. Adjust them — or set the request timeout to `0` to disable it — via the `connectTimeout` and `timeout` arguments:

```
$handler = new OpenObserveHandler(
	host: 'http://localhost:5080',
	organizationId: 'default',
	streamName: 'monolog',
	username: 'admin@yourdomain.com',
	password: 'yourpassword',
	connectTimeout: 2.0,
	timeout: 5.0,
);
```

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance96

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Recently: every ~77 days

Total

7

Last Release

28d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/381cd0165a6aa9f238950dc1ae39f15a2b01a3dc33c111cd0fc1b12ab4259100?d=identicon)[lostland](/maintainers/lostland)

---

Top Contributors

[![overworks](https://avatars.githubusercontent.com/u/2780002?v=4)](https://github.com/overworks "overworks (11 commits)")

---

Tags

logginghandlermonologopenobserve

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/minhyung-monolog-openobserve/health.svg)

```
[![Health](https://phpackages.com/badges/minhyung-monolog-openobserve/health.svg)](https://phpackages.com/packages/minhyung-monolog-openobserve)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[laravel/framework

The Laravel Framework.

34.9k556.2M21.5k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[illuminate/log

The Illuminate Log package.

6225.7M690](/packages/illuminate-log)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M674](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
