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(2mo ago)626.3k↓14.9%6MITPHPPHP &gt;=8.1CI passing

Since Sep 25Pushed 2mo 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 1mo 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQ2NTU1OTgsIm5iZiI6MTc3NDY1NTI5OCwicGF0aCI6Ii82NzMyNDMxOC8yNDk3Njc2NDktNjE1ZG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I0MWExYWMwOTU2NmU3ZWE5ZGU3NjZlMzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6DccXdQckJ5k5XAOIiYul9F7Ah2xGZRNextneuw3Bzc)

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 96% of packages

Maintenance87

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity47

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

64d 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 (8 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)")[![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

[worldia/instrumentation-bundle

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

2769.8k](/packages/worldia-instrumentation-bundle)[inspector-apm/inspector-symfony

Code Execution Monitoring for Symfony applications.

2830.1k2](/packages/inspector-apm-inspector-symfony)

PHPackages © 2026

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