{"id":20574720,"url":"https://github.com/macpaw/symfony-otel-bundle","last_synced_at":"2026-05-28T18:31:32.613Z","repository":{"id":261085427,"uuid":"879742100","full_name":"MacPaw/symfony-otel-bundle","owner":"MacPaw","description":"OpenTelemetry client Bundle","archived":false,"fork":false,"pushed_at":"2025-12-24T12:22:16.000Z","size":626,"stargazers_count":9,"open_issues_count":2,"forks_count":1,"subscribers_count":12,"default_branch":"develop","last_synced_at":"2026-05-05T20:46:23.203Z","etag":null,"topics":["backend","macpaw","otel"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MacPaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-28T13:23:57.000Z","updated_at":"2026-02-04T13:19:16.000Z","dependencies_parsed_at":"2024-11-04T16:36:53.566Z","dependency_job_id":"3840f315-99d7-45b9-afe0-c2e3c40cd32c","html_url":"https://github.com/MacPaw/symfony-otel-bundle","commit_stats":null,"previous_names":["macpaw/symfony-otel-bundle"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MacPaw/symfony-otel-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fsymfony-otel-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fsymfony-otel-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fsymfony-otel-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fsymfony-otel-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MacPaw","download_url":"https://codeload.github.com/MacPaw/symfony-otel-bundle/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacPaw%2Fsymfony-otel-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33622067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","macpaw","otel"],"created_at":"2024-11-16T05:36:49.031Z","updated_at":"2026-05-28T18:31:32.540Z","avatar_url":"https://github.com/MacPaw.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Symfony OpenTelemetry Bundle\n\nA comprehensive OpenTelemetry integration bundle for Symfony applications that provides automatic instrumentation, custom span creation, and distributed tracing capabilities.\n\n## Features\n\n- **Automatic Instrumentation** - Built-in instrumentations for HTTP requests, database operations, and more\n- **Custom Instrumentations** - Easy-to-use framework for creating custom instrumentations\n- **Middleware System** - Extensible middleware system for span customization\n- **Exception Handling** - Automatic span cleanup and error recording\n- **Docker Support** - Complete development environment with Tempo and Grafana\n- **Performance Optimized** - Support for both HTTP and gRPC transport protocols\n- **OpenTelemetry Compliant** - Follows OpenTelemetry specifications and semantic conventions\n\n## Quick Overview\n\nThis bundle provides a configured OpenTelemetry integration for Symfony applications, offering:\n- Automatic telemetry collection via kernel event listeners\n- Custom instrumentation framework for business logic\n- Built-in support for distributed tracing\n- Complete testing and development environment\n\n## Bundle Overview\n\nThis bundle is a wrapper around the [official OpenTelemetry PHP SDK bundle](https://github.com/opentelemetry-php/contrib-sdk-bundle) that simplifies integration and provides additional instrumentation capabilities for Symfony applications.\n\n**Key characteristics:**\n- **Transport-agnostic** - Uses standard OpenTelemetry SDK environment variables for transport configuration\n- **Framework-focused** - Provides Symfony-specific instrumentation and middleware\n- **Extensible** - Easy to add custom instrumentations and span processors\n\n## Built-in Features\n\n- **Request Execution Time Tracking** - Automatic HTTP request timing\n- **Exception Handling** - Automatic span cleanup and error recording\n- **Custom Instrumentations** - Framework for creating custom telemetry collection\n\nFor detailed instrumentation guide, see [Instrumentation Guide](docs/instrumentation.md).\n\n\n\n## Environment Variables\n\nThe bundle supports all standard OpenTelemetry SDK environment variables. For complete configuration reference, see [Configuration Guide](docs/configuration.md).\n\n**Essential variables:**\n- `OTEL_SERVICE_NAME` - Your service name\n- `OTEL_TRACER_NAME` - Tracer name\n- `OTEL_EXPORTER_OTLP_ENDPOINT` - Collector endpoint\n- `OTEL_EXPORTER_OTLP_PROTOCOL` - Transport protocol (grpc/http/protobuf)\n\n### Transport Configuration\n\n**Important:** This bundle is **transport-agnostic** - it doesn't handle transport configuration directly. All transport settings are managed through standard OpenTelemetry SDK environment variables.\n\n**Recommended for production:**\n```bash\n# Install gRPC support\ncomposer require open-telemetry/transport-grpc\npecl install grpc # may take a time to compile - 30-40 minutes\n\n# Configure gRPC endpoint\nOTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317\nOTEL_EXPORTER_OTLP_PROTOCOL=grpc\n```\n\n**Default HTTP endpoint:** `http://collector:4318`\n\n**Transport protocols supported:**\n- `grpc` - High performance, recommended for production\n- `http/protobuf` - Standard HTTP with protobuf encoding\n- `http/json` - HTTP with JSON encoding (slower)\n\n**Note:** Our bundle supports all transport protocols supported by the OpenTelemetry PHP SDK since we don't decorate the transport layer. For complete transport configuration options, see the [official OpenTelemetry PHP Exporters documentation](https://opentelemetry.io/docs/languages/php/exporters/).\n\nFor detailed Docker setup and development environment configuration, see [Docker Development Guide](docs/docker.md).\n\n\n## Documentation\n\n- [Installation Guide](docs/installation.md) - Complete installation and setup instructions\n- [Configuration Reference](docs/configuration.md) - Bundle configuration and environment variables\n- [Instrumentation Guide](docs/instrumentation.md) - Built-in instrumentations and custom development\n- [Docker Development](docs/docker.md) - Local development environment setup\n- [Testing Guide](docs/testing.md) - Testing, trace visualization, and troubleshooting\n\n- [OpenTelemetry Basics](docs/otel_basics.md) - OpenTelemetry concepts and fundamentals\n- [Contributing Guide](CONTRIBUTING.md) - How to contribute to the project\n\n## Quick Start\n\n1. **Install the bundle:**\n   ```bash\n   composer require macpaw/symfony-otel-bundle\n   ```\n\n2. **Enable in your application:**\n   ```php\n   // config/bundles.php\n   return [\n       Macpaw\\SymfonyOtelBundle\\SymfonyOtelBundle::class =\u003e ['all' =\u003e true],\n   ];\n   ```\n\n3. **Configure environment variables:**\n   ```bash\n   OTEL_SERVICE_NAME=your-service-name\n   OTEL_TRACER_NAME=your-tracer-name\n   OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318\n   ```\n\n4. **Start testing:**\n   ```bash\n   make up\n   open http://localhost:8080\n   ```\n\n## Usage\n\nFor detailed usage instructions, see [Testing Guide](docs/testing.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacpaw%2Fsymfony-otel-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacpaw%2Fsymfony-otel-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacpaw%2Fsymfony-otel-bundle/lists"}