PHPackages                             temporal/open-telemetry-interceptors - 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. temporal/open-telemetry-interceptors

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

temporal/open-telemetry-interceptors
====================================

This package provides OpenTelemetry interceptors for Temporal PHP SDK

v1.1.1(5mo ago)539.5k↑41.6%6MITPHPPHP &gt;=8.1CI passing

Since Sep 25Pushed 3w ago5 watchersCompare

[ Source](https://github.com/temporalio/sdk-php-interceptors-opentelemetry)[ Packagist](https://packagist.org/packages/temporal/open-telemetry-interceptors)[ Docs](https://temporal.io/)[ RSS](/packages/temporal-open-telemetry-interceptors/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (14)Versions (5)Used By (0)

Temporal OpenTelemetry Interceptors
===================================

[](#temporal-opentelemetry-interceptors)

Introduction
------------

[](#introduction)

The `temporal/open-telemetry-interceptors` package provides OpenTelemetry interceptors for tracing workflows and activities within the Temporal system using the [OpenTelemetry SDK](https://opentelemetry.io/docs/instrumentation/php/).

These interceptors capture and trace various actions and events, such as handling activities, starting workflows, sending signals, and executing workflow events. By integrating OpenTelemetry tracing, you gain visibility into the behavior and performance of your Temporal applications.

[![OpenTelemetry Tracing Example](https://private-user-images.githubusercontent.com/67324318/249767649-615dd335-39df-4526-af71-7f422e39bfa9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODU1NTA1MDgsIm5iZiI6MTc4NTU1MDIwOCwicGF0aCI6Ii82NzMyNDMxOC8yNDk3Njc2NDktNjE1ZGQzM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kYTg2NzVkMjhmMmYyNmNhYmIwODgxNjEzMTMzMDA5ZWI1NTAwMjUyYmEyODQyOTIwODImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.foLU6wZ6cAQN_Av-RENVg1ci7-xmcS7FhNoqc433gSo)

Get Started
-----------

[](#get-started)

### Installation

[](#installation)

Install the package using Composer:

```
composer require temporal/open-telemetry-interceptors
```

### Basic Setup

[](#basic-setup)

1. **Create a Pipeline Provider with Interceptors**

```
use OpenTelemetry\API\Trace\Propagation\TraceContextPropagator;
use OpenTelemetry\SDK\Trace;
use Temporal\OpenTelemetry\Interceptor\OpenTelemetryActivityInboundInterceptor;
use Temporal\OpenTelemetry\Interceptor\OpenTelemetryWorkflowClientCallsInterceptor;
use Temporal\OpenTelemetry\Interceptor\OpenTelemetryWorkflowOutboundRequestInterceptor;
use Temporal\Interceptor\SimplePipelineProvider;

// Create a span processor
$spanProcessor = (new Trace\SpanProcessorFactory())->create(
    (new Trace\ExporterFactory())->create(),
);

// Create a tracer provider
$tracerProvider = new Trace\TracerProvider($spanProcessor);

// Create a tracer which wraps the OpenTelemetry tracer
$tracer = new Temporal\OpenTelemetry\Tracer(
    // Pass a unique name for your application
    $tracerProvider->getTracer('My super app'),
    TraceContextPropagator::getInstance(),
);

// Configure the interceptor pipeline
$provider = new SimplePipelineProvider([
    new OpenTelemetryActivityInboundInterceptor($tracer),
    new OpenTelemetryWorkflowClientCallsInterceptor($tracer),
    new OpenTelemetryWorkflowOutboundRequestInterceptor($tracer),
]);
```

2. **Apply Interceptors to Workflow Client and Worker**

```
// Add interceptors to the workflow client
$client = new Temporal\Client\WorkflowClient(
    ...,
    interceptorProvider: $provider
);

// Add interceptors to the worker
$worker = new WorkerFactory(
   ...,
   pipelineProvider: $provider
);
```

Available Interceptors
----------------------

[](#available-interceptors)

This package provides three specialized interceptors:

### OpenTelemetryActivityInboundInterceptor

[](#opentelemetryactivityinboundinterceptor)

Traces the execution of activities. This interceptor creates spans when an activity is handled.

### OpenTelemetryWorkflowClientCallsInterceptor

[](#opentelemetryworkflowclientcallsinterceptor)

Focuses on tracing client-side workflow operations. This interceptor creates spans when calling `start()`, `signalWithStart()`, or `updateWithStart()` methods and propagates the context to the workflow execution.

### OpenTelemetryWorkflowOutboundRequestInterceptor

[](#opentelemetryworkflowoutboundrequestinterceptor)

Captures outbound requests made by workflows. This includes spans for activities execution, child workflows, timers, signals to external workflows, and other outbound operations. It provides comprehensive tracing of how workflows interact with other components in the system.

Warning

This interceptor operates in blocking mode when sending telemetry, which may impact Workflow Worker bandwidth. Using a local collector is recommended to minimize network latency impact.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance85

Actively maintained with recent releases

Popularity37

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

3

Last Release

155d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/110fa17dca123e71e4ef4132d1d6a66d20058a07fc6118e716dd67dd4316e886?d=identicon)[roxblnfk](/maintainers/roxblnfk)

![](https://avatars.githubusercontent.com/u/6815714?v=4)[Dmitrii Derepko](/maintainers/xepozz)[@xepozz](https://github.com/xepozz)

![](https://www.gravatar.com/avatar/8cee22b5338cd1ac7c8a79e6d4928f8eb81acc6f505c0cbcb9b5ecc746bb3dc1?d=identicon)[temporalio](/maintainers/temporalio)

---

Top Contributors

[![roxblnfk](https://avatars.githubusercontent.com/u/4152481?v=4)](https://github.com/roxblnfk "roxblnfk (27 commits)")[![msmakouz](https://avatars.githubusercontent.com/u/67324318?v=4)](https://github.com/msmakouz "msmakouz (11 commits)")[![xepozz](https://avatars.githubusercontent.com/u/6815714?v=4)](https://github.com/xepozz "xepozz (9 commits)")[![root-aza](https://avatars.githubusercontent.com/u/13816704?v=4)](https://github.com/root-aza "root-aza (7 commits)")[![gplanchat](https://avatars.githubusercontent.com/u/152367?v=4)](https://github.com/gplanchat "gplanchat (2 commits)")[![picatz](https://avatars.githubusercontent.com/u/14850816?v=4)](https://github.com/picatz "picatz (1 commits)")[![butschster](https://avatars.githubusercontent.com/u/773481?v=4)](https://github.com/butschster "butschster (1 commits)")

---

Tags

phpinterceptorstemporalopen-telemetry

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/temporal-open-telemetry-interceptors/health.svg)

```
[![Health](https://phpackages.com/badges/temporal-open-telemetry-interceptors/health.svg)](https://phpackages.com/packages/temporal-open-telemetry-interceptors)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k99.8M355](/packages/laravel-horizon)[keepsuit/laravel-opentelemetry

OpenTelemetry integration for laravel

173666.7k1](/packages/keepsuit-laravel-opentelemetry)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M674](/packages/shopware-core)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2023.2M367](/packages/drupal-core-dev)[worldia/instrumentation-bundle

Symfony opentelemetry auto-instrumentation: requests, commands, messenger, doctrine.

2877.2k](/packages/worldia-instrumentation-bundle)[koriym/xdebug-mcp

Universal PHP Xdebug MCP Server with AI-optimized debugging support

5431.7k1](/packages/koriym-xdebug-mcp)

PHPackages © 2026

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