PHPackages                             beemlabs/beem-php - 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. beemlabs/beem-php

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

beemlabs/beem-php
=================

Core Beem SDK for PHP — framework-agnostic, zero dependencies.

v0.1.0(yesterday)03↑2900%2MITPHP &gt;=8.2

Since Jul 19Compare

[ Source](https://github.com/beemlabs/beem-php)[ Packagist](https://packagist.org/packages/beemlabs/beem-php)[ RSS](/packages/beemlabs-beem-php/feed)WikiDiscussions Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (2)

 [![beem-php — Core Beem SDK for PHP](.github/banner.svg)](.github/banner.svg)

 [![CI](https://github.com/beemlabs/beem-php/actions/workflows/ci.yml/badge.svg)](https://github.com/beemlabs/beem-php/actions/workflows/ci.yml) [![Latest Version](https://camo.githubusercontent.com/584e6fd2ae820b4aff55e5c2b4b77ecb639e9f219e925b059e6fc30596ae3a9a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6265656d6c6162732f6265656d2d706870)](https://packagist.org/packages/beemlabs/beem-php) [![Total Downloads](https://camo.githubusercontent.com/f539e3816340a85745afaac3306fe49f195255e69f1b404efa943a11e1309f6c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6265656d6c6162732f6265656d2d706870)](https://packagist.org/packages/beemlabs/beem-php) [![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

Core Beem SDK for PHP — framework-agnostic, zero runtime dependencies.

Captures transactions, spans, and exceptions from any PHP application and ships them to a Beem server over HTTP, with automatic batching and shutdown flush.

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

[](#requirements)

- PHP 8.2+
- `ext-json`, `ext-curl`

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

[](#installation)

```
composer require beemlabs/beem-php
```

Using Symfony or Laravel? Prefer the framework packages, which auto-instrument HTTP, DB, console, and queues on top of this core:

- [`beemlabs/beem-symfony`](https://github.com/beemlabs/beem-symfony)
- [`beemlabs/beem-laravel`](https://github.com/beemlabs/beem-laravel)

Quick start
-----------

[](#quick-start)

```
use Beem\Beem;

Beem::init(['dsn' => 'https://pk_abc123@beem.example.com/shop-api']);

$tx = Beem::startTransaction('GET /orders/{id}', 'http.server');
try {
    $span = $tx->startSpan('db.query', 'SELECT * FROM orders WHERE id = ?');
    $orders = $db->query('SELECT * FROM orders WHERE id = ?', [$id]);
    $span->finish(12.3);
} catch (\Throwable $e) {
    Beem::captureException($e);
    throw $e;
} finally {
    Beem::finishTransaction(200);
    Beem::flush();
}
```

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

[](#configuration)

`Beem::init()` accepts:

OptionDefaultDescription`dsn`— (required)Project DSN, e.g. `https://@/``sample_rate``1.0`Fraction of transactions to record (0.0–1.0)`max_batch_size``500`Events buffered before an automatic flush`flush_timeout_ms``2000`HTTP transport timeout per flush`environment``production`Environment tag attached to every event`release``null`Release/version tag attached to every event`default_tags``[]`Key/value tags merged into every eventAPI
---

[](#api)

- `Beem::init(array $options): Client` — bootstrap the global client
- `Beem::startTransaction(string $name, string $op = 'http.server'): Transaction`
- `Beem::getCurrentTransaction(): ?Transaction`
- `Beem::finishTransaction(?int $httpStatus = null): ?array`
- `Beem::captureException(\Throwable $e, array $context = []): ?array`
- `Beem::flush(): void` — force-send buffered events
- `Transaction::startSpan(string $op, string $description): Span`
- `Span::finish(?float $durationMs = null): void`

Events are buffered in-process and flushed on `flush()`, when the batch is full, or automatically at shutdown.

Development
-----------

[](#development)

```
composer install
composer test      # Pest
composer analyse   # PHPStan level 6
composer cs:check  # php-cs-fixer (dry-run)
composer cs:fix    # php-cs-fixer
```

This repository is a read-only split of the [Beem monorepo](https://github.com/beemlabs). Please open issues and pull requests there — direct pushes here are overwritten by the next sync.

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

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

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/039537c97e58c2e3bb0332c34155dc79ae3a2d3dbad1f3f88f2685466263e13c?d=identicon)[bozkurtemre](/maintainers/bozkurtemre)

---

Tags

phpmonitoringerrorsapmtracingbeem

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/beemlabs-beem-php/health.svg)

```
[![Health](https://phpackages.com/badges/beemlabs-beem-php/health.svg)](https://phpackages.com/packages/beemlabs-beem-php)
```

###  Alternatives

[anousss007/vigilance

A driver-agnostic control center for Laravel queues, jobs, commands and the scheduler. Monitor what ran (with parameters), see failures, and dispatch jobs or run artisan commands manually from a self-contained dashboard.

1756.8k](/packages/anousss007-vigilance)

PHPackages © 2026

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