iqtool / ciotel
OpenTelemetry Integration for CodeIgniter 4
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/iqtool/ciotel
Requires
- php: ^7.4 || ^8.0
- codeigniter4/framework: ^4.0
- open-telemetry/exporter-otlp: ^1.3
- open-telemetry/opentelemetry-auto-codeigniter: ^0.1.0
- open-telemetry/sdk: ^1.10
- php-http/guzzle7-adapter: ^1.1
Requires (Dev)
- codeigniter4/devkit: ^1.3
README
OpenTelemetry Integration for CodeIgniter 4.
Description
This package provides seamless integration of OpenTelemetry with CodeIgniter 4 applications. It enables automatic tracing of incoming requests, database queries, and integrates with the CodeIgniter logging system.
Features
- Automatic Request Tracing: Automatically instrument incoming HTTP requests using
OtelFilter. - Database Query Tracing: Automatically trace database queries including SQL statements and execution time using
OtelDbListener. - Log Integration: Pushes CodeIgniter logs (
log_message()) to OpenTelemetry viaOtelHandler. - Zero Configuration: Uses CodeIgniter 4's
Registrarfor auto-discovery of events, filters, and services.
Installation
Install the package via Composer:
composer require iqtool/ciotel
Configuration
The package is designed to work out-of-the-box. It uses standard OpenTelemetry environment variables for configuration (e.g., OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAME).
Database Tracing
Database tracing spans will automatically include:
db.system: Trace driver (e.g. mysql, sqlite).db.statement: The executed SQL query.db.name: Database name.db.hostname: Database host.
License
This project is licensed under the MIT License - see the LICENSE file for details.