PHPackages                             webgrip/telemetry-service - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. webgrip/telemetry-service

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

webgrip/telemetry-service
=========================

A simple telemetry service for PHP applications

1.0.4(1y ago)0120[1 PRs](https://github.com/webgrip/telemetry-service/pulls)MITPHPPHP ^8.2CI passing

Since Oct 12Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/webgrip/telemetry-service)[ Packagist](https://packagist.org/packages/webgrip/telemetry-service)[ RSS](/packages/webgrip-telemetry-service/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (23)Versions (16)Used By (0)

[![semantic-release: angular](https://camo.githubusercontent.com/9cdd34ac7322a84f2cf0ff00d590f5cc32229560a89e898aa2c5a5eeecbd5dfc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73656d616e7469632d2d72656c656173652d616e67756c61722d6531303037393f6c6f676f3d73656d616e7469632d72656c65617365)](https://github.com/semantic-release/semantic-release)

Prerequisites
=============

[](#prerequisites)

- PHP 8.2
- Composer

How to use
==========

[](#how-to-use)

### Serviceprovider

[](#serviceprovider)

```
TelemetryServiceProvider::class
```

### Using TelemetryService to log

[](#using-telemetryservice-to-log)

```
use \Webgrip\TelemetryService\Core\Domain\Services\TelemetryServiceInterface;

class Foo
{
    public function __construct(private TelemetryServiceInterface $telemetryService) {
    }

    public function bar()
    {
        $this->telemetryService->logger()->debug('Hello World');
        $this->telemetryService->logger()->info('Hello World');
        $this->telemetryService->logger()->warning('Hello World');
        // ...
    }
}
```

### Using TelemetryService to trace

[](#using-telemetryservice-to-trace)

```
use \Webgrip\TelemetryService\Core\Domain\Services\TelemetryServiceInterface;

class Foo
{
    public function __construct(private TelemetryServiceInterface $telemetryService) {
    }

    public function bar()
    {
        $tracer = $this->telemetryService->tracer();
        $span = $tracer->spanBuilder('foo')->startSpan();

        $span->addEvent('bar');
        $span->setAttributes(['foo' => 'bar']);
        $span->recordException(new \Exception('Hello World'));
        $span->addLink('foo', 'bar');
        // ...

        $span->end();
    }
}
```

### Using attributes

[](#using-attributes)

> You can add the attribute 'Webgrip\\TelemetryService\\Core\\Domain\\Services\\Traceable' to your class to automatically trace all methods of the class You can also use this attribute to trace a single method

```
#[\Webgrip\TelemetryService\Core\Domain\Attributes\Traceable]
class Foo
{
    public function bar()
    {
        // ...
    }

    #[\Webgrip\TelemetryService\Core\Domain\Attributes\Traceable]
    public function baz()
    {
        // ...
    }
}
```

```
// DI configuration
return [
    Foo::class => function (\DI\Container $container) {
        $factory = $container->get(\Webgrip\TelemetryService\Infrastructure\Factories\TracedClassFactory::class)
        $foo = new Foo();

        return $factory->create($foo);
    }
];
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance62

Regular maintenance activity

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 93.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 ~18 days

Recently: every ~50 days

Total

13

Last Release

404d ago

Major Versions

0.4.5 → v1.0.12025-02-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3602480?v=4)[Ryan Grippeling](/maintainers/Ryangr0)[@Ryangr0](https://github.com/Ryangr0)

---

Top Contributors

[![Ryangr0](https://avatars.githubusercontent.com/u/3602480?v=4)](https://github.com/Ryangr0 "Ryangr0 (82 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (5 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (1 commits)")

---

Tags

libraryphpopentelemetrytelemetry

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webgrip-telemetry-service/health.svg)

```
[![Health](https://phpackages.com/badges/webgrip-telemetry-service/health.svg)](https://phpackages.com/packages/webgrip-telemetry-service)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M576](/packages/shopware-core)[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

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