PHPackages                             weijukeji/laravel-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. weijukeji/laravel-openobserve

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

weijukeji/laravel-openobserve
=============================

Laravel package for OpenObserve integration - centralized log management and monitoring

v0.1.3(2mo ago)06↓50%MITPHPPHP ^8.3

Since Feb 28Pushed 2mo agoCompare

[ Source](https://github.com/WeiJuKeJi/laravel-openobserve)[ Packagist](https://packagist.org/packages/weijukeji/laravel-openobserve)[ RSS](/packages/weijukeji-laravel-openobserve/feed)WikiDiscussions 0.x Synced 1mo ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

Laravel OpenObserve
===================

[](#laravel-openobserve)

[![Tests](https://github.com/overworks/laravel-openobserve/actions/workflows/tests.yml/badge.svg?branch=0.x)](https://github.com/overworks/laravel-openobserve/actions/workflows/tests.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/384d4a627e57e22f8485f1fef651f6c4ce33e9d591bf306bd23ec551255f146f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7765696a756b656a692f6c61726176656c2d6f70656e6f6273657276652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/weijukeji/laravel-openobserve)[![Total Downloads](https://camo.githubusercontent.com/f4310daf365ec17d5276b6db2304e68cdb726d1577db3f96a6e450e1f41f990a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7765696a756b656a692f6c61726176656c2d6f70656e6f6273657276652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/weijukeji/laravel-openobserve)

A Laravel package for integrating with [OpenObserve](https://openobserve.ai). Send your logs to OpenObserve for centralized log management and monitoring.

**[한국어 문서](README.ko.md)**

Features
--------

[](#features)

- Seamless integration with Laravel's logging system
- Efficient log transmission via batch processing
- Configurable additional fields on all log entries
- Direct API access through Facade
- Automatic exception information capture (class, message, code, file, line, trace)
- Artisan command for connection testing

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

[](#requirements)

- PHP 8.3+
- Laravel 11.x or 12.x

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

[](#installation)

Install the package via Composer:

```
composer require weijukeji/laravel-openobserve
```

Publish the configuration file:

```
php artisan vendor:publish --tag=openobserve-config
```

Configuration
-------------

[](#configuration)

Add OpenObserve connection details to your `.env` file:

```
OPENOBSERVE_ENABLED=true
OPENOBSERVE_URL=http://localhost:5080
OPENOBSERVE_ORGANIZATION=default
OPENOBSERVE_STREAM=laravel-logs
OPENOBSERVE_EMAIL=your-email@example.com
OPENOBSERVE_PASSWORD=your-password
```

### All Configuration Options

[](#all-configuration-options)

OptionEnv VariableDefault`enabled``OPENOBSERVE_ENABLED``false``url``OPENOBSERVE_URL``http://localhost:5080``organization``OPENOBSERVE_ORGANIZATION``default``stream``OPENOBSERVE_STREAM``default``auth.email``OPENOBSERVE_EMAIL`-`auth.password``OPENOBSERVE_PASSWORD`-`batch_size``OPENOBSERVE_BATCH_SIZE``100``timeout``OPENOBSERVE_TIMEOUT``5``ssl_verify``OPENOBSERVE_SSL_VERIFY``true``additional_fields``APP_ENV`, `APP_NAME``['environment', 'application']`### Laravel Logging Channel Setup

[](#laravel-logging-channel-setup)

Add the OpenObserve channel to your `config/logging.php`:

```
'channels' => [
    // ... existing channels

    'openobserve' => [
        'driver' => 'custom',
        'via' => \Weijukeji\LaravelOpenObserve\Logging\OpenObserveLogger::class,
        'level' => env('LOG_LEVEL', 'debug'),
        'name' => 'openobserve',
    ],

    // Optionally add openobserve to a stack channel
    'stack' => [
        'driver' => 'stack',
        'channels' => ['single', 'openobserve'],
        'ignore_exceptions' => false,
    ],
],
```

Set the default log channel in your `.env` file:

```
LOG_CHANNEL=stack  # or 'openobserve'
```

Usage
-----

[](#usage)

### Laravel Logging

[](#laravel-logging)

Use it just like standard Laravel logging:

```
use Illuminate\Support\Facades\Log;

Log::info('User logged in', ['user_id' => 123]);
Log::error('An error occurred', ['error' => $exception->getMessage()]);
Log::warning('Warning message');
Log::debug('Debug information', ['data' => $debugData]);
```

### Direct Usage via Facade

[](#direct-usage-via-facade)

Access the OpenObserve client directly through the Facade:

```
use Weijukeji\LaravelOpenObserve\Facades\OpenObserve;

// Send a single log entry
OpenObserve::send([
    'level' => 'info',
    'message' => 'User action',
    'user_id' => 123,
    'action' => 'purchase',
]);

// Add to batch (automatically sent when batch size is reached)
OpenObserve::addToBatch([
    'level' => 'info',
    'message' => 'Event occurred',
]);

// Manually flush the batch
OpenObserve::flush();
```

### Dependency Injection

[](#dependency-injection)

```
use Weijukeji\LaravelOpenObserve\OpenObserveClient;

class SomeController extends Controller
{
    public function __construct(
        private OpenObserveClient $openObserve
    ) {}

    public function index()
    {
        $this->openObserve->send([
            'level' => 'info',
            'message' => 'Controller executed',
            'controller' => self::class,
        ]);
    }
}
```

### Connection Test

[](#connection-test)

Test the connection to OpenObserve using the Artisan command:

```
php artisan openobserve:test
```

This will display your configuration and send a test log entry to verify connectivity.

Testing
-------

[](#testing)

```
composer test
```

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability, please email .

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

Credits
-------

[](#credits)

- [Minhyung Park](https://github.com/overworks)
- [All Contributors](../../contributors)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance86

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.2% 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 ~0 days

Total

5

Last Release

74d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/27f8944998bade02e78cf1fa70a4363be1960fe9d6fb86b0837bf1b4e7de93b1?d=identicon)[ruihuachen](/maintainers/ruihuachen)

---

Top Contributors

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

---

Tags

laravelloggingmonitoringobservabilityopenobserve

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/weijukeji-laravel-openobserve/health.svg)

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

###  Alternatives

[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)

PHPackages © 2026

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