PHPackages                             shopware/opentelemetry - 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. shopware/opentelemetry

ActiveLibrary

shopware/opentelemetry
======================

OpenTelemetry auto-instrumentation for Shopware

0.1.7(3mo ago)931.1k↓24.8%2[1 PRs](https://github.com/shopware/opentelemetry/pulls)1Apache-2.0PHPPHP ^8.1CI passing

Since Dec 29Pushed 2mo ago9 watchersCompare

[ Source](https://github.com/shopware/opentelemetry)[ Packagist](https://packagist.org/packages/shopware/opentelemetry)[ RSS](/packages/shopware-opentelemetry/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (7)Versions (14)Used By (1)

OpenTelemetry for Shopware 6
============================

[](#opentelemetry-for-shopware-6)

This is not an official OpenTelemetry project. This repository contains a Shopware-specific implementation using OpenTelemetry standards.

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

[](#requirements)

- `ext-opentelemetry` PHP extension
- Optional: `ext-grpc` when using the gRPC exporter

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

[](#installation)

```
composer require shopware/opentelemetry
```

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

[](#configuration)

Enable open telemetry with the following environment variables:

```
OTEL_PHP_AUTOLOAD_ENABLED=true
OTEL_SERVICE_NAME=shopware # or any other name
```

This extension can be disabled via:

```
OTEL_PHP_DISABLED_INSTRUMENTATIONS=shopware
```

You will need to configure the exporter to send the data to a collector.

Here is an example with OTLP over gRPC:

```
OTEL_TRACES_EXPORTER=otlp
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
```

You will need to install also composer packages: `open-telemetry/transport-grpc` and `open-telemetry/exporter-otlp`.

### Enabling Shopware custom tracing

[](#enabling-shopware-custom-tracing)

To enable tracing for Shopware, you need to add the following config:

```
# config/packages/opentelemetry.yaml

shopware:
    profiler:
        integrations:
            - OpenTelemetry
```

Adding custom spans
-------------------

[](#adding-custom-spans)

**This spans are working with all profilers (Symfony Profiler bar, Tideways, ...) and are not exclusive to OpenTelemetry.**

```
use Shopware\Core\Profiling\Profiler;

$value = Profiler::trace('', function () {
    return $myFunction();
});
```

Forward logs to OpenTelemetry
-----------------------------

[](#forward-logs-to-opentelemetry)

You can forward logs to OpenTelemetry with the following configuration:

```
# config/packages/opentelemetry.yaml

monolog:
    handlers:
        main:
            type: service
            id: monolog.handler.open_telemetry
        elasticsearch:
            type: service
            id: monolog.handler.open_telemetry
```

Transport metrics to OpenTelemetry
----------------------------------

[](#transport-metrics-to-opentelemetry)

You can enable OpenTelemetry metrics transport with the following configuration:

```
# config/packages/opentelemetry.yaml
open_telemetry_shopware:
  metrics:
    enabled: true
    namespace: 'io.opentelemetry.contrib.php.shopware' # or your custom namespace
```

Please note that OpenTelemetry SDK has to be configured to send metrics to the collector. It is configured using the same environment variables. Example configuration could look like this:

```
OTEL_SERVICE_NAME=shopware
OTEL_PHP_AUTOLOAD_ENABLED=true
OTEL_METRICS_EXPORTER=otlp
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta
```

### Temporality configuration

[](#temporality-configuration)

OpenTelemetry PHP SDK does not support storage for accumulation of metrics. As PHP processes are short-lived, it's best to emit metrics with delta temporality and aggregate them on receiving side. Unfortunately at the moment of writing this OpenTelemetry Collector does not support transforming delta temporality metrics to cumulative. The feature is in the development, the progress can be tracked [here](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30705).

Meanwhile the issue can be handled either by implementing aggregation manually or use metrics backend that can work with delta temporality. We've successfully tested this with DataDog.

Some links:

- [OpenTelemetry Metrics Data Model](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#metric-points)
- [Temporality easily explained](https://grafana.com/blog/2023/09/26/opentelemetry-metrics-a-guide-to-delta-vs.-cumulative-temporality-trade-offs/)

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance84

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community19

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

Recently: every ~136 days

Total

9

Last Release

98d ago

PHP version history (3 changes)0.1.0PHP ^8.0

0.1.3PHP ^8.1

0.2.0-alphaPHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c45ef9077b73fce78afbfab2fa27e611a453dd77de003e2785ac84105d02bef?d=identicon)[shyim](/maintainers/shyim)

---

Top Contributors

[![shyim](https://avatars.githubusercontent.com/u/6224096?v=4)](https://github.com/shyim "shyim (20 commits)")[![h1k3r](https://avatars.githubusercontent.com/u/1944853?v=4)](https://github.com/h1k3r "h1k3r (17 commits)")[![Gaitholabi](https://avatars.githubusercontent.com/u/24876890?v=4)](https://github.com/Gaitholabi "Gaitholabi (3 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (1 commits)")[![pkramme](https://avatars.githubusercontent.com/u/19418956?v=4)](https://github.com/pkramme "pkramme (1 commits)")

---

Tags

shopwaretracingopentelemetryotelinstrumentationopen-telemetry

### Embed Badge

![Health badge](/badges/shopware-opentelemetry/health.svg)

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

###  Alternatives

[open-telemetry/opentelemetry-auto-symfony

OpenTelemetry auto-instrumentation for Symfony

551.2M1](/packages/open-telemetry-opentelemetry-auto-symfony)[open-telemetry/opentelemetry-auto-laravel

OpenTelemetry auto-instrumentation for Laravel

531.9M8](/packages/open-telemetry-opentelemetry-auto-laravel)[open-telemetry/opentelemetry-auto-pdo

OpenTelemetry auto-instrumentation for PDO

111.2M1](/packages/open-telemetry-opentelemetry-auto-pdo)[open-telemetry/opentelemetry-auto-wordpress

OpenTelemetry auto-instrumentation for Wordpress

17166.0k](/packages/open-telemetry-opentelemetry-auto-wordpress)

PHPackages © 2026

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