Skip to content

logtide-dev/logtide-php

LogTide Logo

LogTide PHP SDK

Release License CI

Official PHP SDKs for LogTide - self-hosted log management with distributed tracing, error capture, and breadcrumbs for every major framework.


Packages

Package Version Description
logtide/logtide Packagist Core client, hub, transports, and utilities
logtide/logtide-laravel Packagist Laravel integration
logtide/logtide-symfony Packagist Symfony Bundle
logtide/logtide-slim Packagist Slim 4 middleware
logtide/logtide-wordpress Packagist WordPress integration

Quick Start

Every framework package follows the same pattern - pass your DSN and service name:

# Install for your framework
composer require logtide/logtide-laravel    # Laravel
composer require logtide/logtide-symfony    # Symfony
composer require logtide/logtide-slim       # Slim 4
composer require logtide/logtide-wordpress  # WordPress
composer require logtide/logtide            # Core (standalone)
// Every integration follows the same pattern:
\LogTide\init([
    'dsn' => 'https://lp_your_key@your-logtide-instance.com',
    'service' => 'my-app',
]);

// Or use api_url + api_key separately:
\LogTide\init([
    'api_url' => 'https://your-logtide-instance.com',
    'api_key' => 'lp_your_key',
    'service' => 'my-app',
]);

See each package's README for framework-specific setup instructions.


Architecture

logtide/logtide                ← Core: Client, Hub, Scope, Transports, Integrations
    ↓
├── logtide/logtide-laravel    ← Laravel ServiceProvider, Middleware, Log Channel
├── logtide/logtide-symfony    ← Symfony Bundle, Event Subscribers
├── logtide/logtide-slim       ← Slim 4 PSR-15 Middleware
└── logtide/logtide-wordpress  ← WordPress hooks & integrations

All framework packages share logtide/logtide core for:

  • Distributed tracing (W3C Trace Context / traceparent)
  • Error serialization with structured stack traces
  • Breadcrumbs for HTTP, database, and custom events
  • Batched transport with retry logic and circuit breaker
  • Scope isolation per request
  • Monolog integration for logging

Development

# Install dependencies
composer install

# Run all tests
composer test

# Run tests with coverage
composer test:coverage

# Static analysis (PHPStan level 8)
composer phpstan

# Code style check (PSR-12)
composer cs

# Code style fix
composer cs:fix

Branch Model

feature/* ──> develop ──> main ──> tag v*.*.* ──> Packagist publish
hotfix/*  ──> main (via PR, for urgent fixes)

See .github/BRANCH_PROTECTION.md for full details.

Contributing

Contributions are welcome! Please read CONTRIBUTING.md before opening a pull request.

License

MIT License - see LICENSE for details.

Links