prism-php / opentelemetry
OpenTelemetry telemetry driver for Prism PHP applications.
Fund package maintenance!
sixlive
Requires
- php: ^8.2
- google/protobuf: ^4.31
- guzzlehttp/psr7: ^2.6
- laravel/framework: ^11.0|^12.0
- open-telemetry/api: ^1.3
- open-telemetry/exporter-otlp: ^1.3
- open-telemetry/sdk: ^1.5
- php-http/guzzle7-adapter: ^1.1
- prism-php/prism: dev-feat/telemetry-events
- psr/http-factory: ^1.1
Requires (Dev)
- laravel/pint: ^1.14
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.4
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3
- phpstan/phpdoc-parser: ^1.24
- phpstan/phpstan: ^1.11
- phpstan/phpstan-deprecation-rules: ^1.2
- projektgopher/whisky: ^0.7.0
- rector/rector: ^1.1
- spatie/laravel-ray: ^1.39
- symplify/rule-doc-generator-contracts: ^11.2
This package is auto-updated.
Last update: 2025-06-04 16:58:18 UTC
README
Prism OpenTelemetry
OpenTelemetry telemetry driver for Prism PHP applications. This package provides distributed tracing capabilities using OpenTelemetry standards.
Installation
Install the package via Composer:
composer require prism-php/opentelemetry
Configuration
Configure Prism to use the OpenTelemetry driver in your config/prism.php
:
// config/prism.php 'telemetry' => [ 'enabled' => true, 'driver' => 'opentelemetry', 'drivers' => [ 'opentelemetry' => [ 'service_name' => env('OPENTELEMETRY_SERVICE_NAME', 'laravel-app'), 'service_version' => env('OPENTELEMETRY_SERVICE_VERSION', '1.0.0'), 'endpoint' => env('OPENTELEMETRY_ENDPOINT', 'http://localhost:4318/v1/traces'), ], ], ],
Configure your environment variables:
# Enable Prism telemetry PRISM_TELEMETRY_ENABLED=true PRISM_TELEMETRY_DRIVER=opentelemetry # OpenTelemetry configuration OPENTELEMETRY_SERVICE_NAME=my-laravel-app OPENTELEMETRY_SERVICE_VERSION=1.0.0 OPENTELEMETRY_ENDPOINT=http://localhost:4318/v1/traces
Usage
Once configured, Prism will automatically send telemetry data to your OpenTelemetry collector.
License
The MIT License (MIT). Please see License File for more information.