PHPackages                             shish/microotlp - 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. shish/microotlp

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

shish/microotlp
===============

A minimal OpenTelemetry logging library

v1.0.0(2mo ago)75.5k↑86.1%1MITPHPPHP ^8.4CI passing

Since Oct 4Pushed 1mo agoCompare

[ Source](https://github.com/shish/microotlp)[ Packagist](https://packagist.org/packages/shish/microotlp)[ Docs](https://github.com/shish/microotlp)[ RSS](/packages/shish-microotlp/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (18)Used By (0)

MicroOTLP
=========

[](#microotlp)

Because I don't want my logging framework to require a specific web serving framework @\_@

MicroOTLP is a minimalistic OpenTelemetry Protocol (OTLP) client library for sending telemetry data (traces, metrics, and logs) to an OTLP collector or backend. It is designed to be lightweight and easy to integrate into various applications without the need for a full-fledged OpenTelemetry SDK.

Benefits
--------

[](#benefits)

- Zero dependencies
- 40x faster than the official OpenTelemetry SDK for PHP
- No assumption for PSR-7/15/18/etc, frameworks, or logging libraries

Differences
-----------

[](#differences)

- Simpler API -- less flexible, but covers all the common cases with much less code

Limitations
-----------

[](#limitations)

- Only supports HTTP transport for sending data
- Assumes one Trace per request (though you can create multiple `Client`s if you want multiple traces)
- Assumes metrics, logs, and traces are sent to the same Collector

Example
-------

[](#example)

```
use MicroOTLP\Client;

$c = new Client('http://localhost:4318');

$topSpan = $c->startSpan('my-span');
  $childSpan1 = $c->startSpan('initialising-stuff');
    $c->logMessage("Initialising stuff");
  $childSpan1->end();
  $childSpan2 = $c->startSpan('doing-stuff');
    $c->logMessage("Doing stuff");
    $c->logCounter("number.of.things.done", 1);
    $c->logGauge("current.thing.in.progress", 42);
  $childSpan2->end();
$topSpan->end();

$c->flush();
```

Performance
-----------

[](#performance)

This is probably an unfair comparison because I don't have the OTLP SDK native extension installed (PRs to update the benchmark setup are welcome)

A loop of 10,000 x "create span, log message, end span":

```
No instrumentation :   5ms
MicroOTLP          :  20ms
OpenTelemetry SDK  : 800ms

```

In a more real-world use case, response times for my image gallery were typically around 50ms -- when I added OTSDK logging, that added 50ms of overhead; microotlp adds 1ms of overhead.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance86

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~10 days

Recently: every ~22 days

Total

17

Last Release

88d ago

Major Versions

v0.0.15 → v1.0.02026-03-13

PHP version history (2 changes)v0.0.0PHP ^8.2

v1.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/a40f5d114b344f735652e4ccc988a618ef5ee2e85a644abeb7e20e92f4c740d5?d=identicon)[shish](/maintainers/shish)

---

Top Contributors

[![shish](https://avatars.githubusercontent.com/u/40659?v=4)](https://github.com/shish "shish (51 commits)")

---

Tags

opentelemetryotlp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/shish-microotlp/health.svg)

```
[![Health](https://phpackages.com/badges/shish-microotlp/health.svg)](https://phpackages.com/packages/shish-microotlp)
```

###  Alternatives

[open-telemetry/api

API for OpenTelemetry PHP.

1938.5M259](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M315](/packages/open-telemetry-sdk)[keepsuit/laravel-opentelemetry

OpenTelemetry integration for laravel

162476.0k](/packages/keepsuit-laravel-opentelemetry)[open-telemetry/context

Context implementation for OpenTelemetry PHP.

1538.0M71](/packages/open-telemetry-context)[open-telemetry/opentelemetry-auto-laravel

OpenTelemetry auto-instrumentation for Laravel

582.4M8](/packages/open-telemetry-opentelemetry-auto-laravel)[open-telemetry/opentelemetry-auto-symfony

OpenTelemetry auto-instrumentation for Symfony

561.5M3](/packages/open-telemetry-opentelemetry-auto-symfony)

PHPackages © 2026

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