{"id":31542630,"url":"https://github.com/opencodeco/hyperf-opentelemetry","last_synced_at":"2026-01-20T16:27:10.383Z","repository":{"id":316491664,"uuid":"1062553603","full_name":"opencodeco/hyperf-opentelemetry","owner":"opencodeco","description":"OpenTelemetry instrumentation for Hyperf framework","archived":false,"fork":false,"pushed_at":"2025-11-07T19:17:15.000Z","size":145,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-06T16:46:19.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencodeco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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":"2025-09-23T12:10:33.000Z","updated_at":"2026-01-05T09:37:52.000Z","dependencies_parsed_at":"2025-09-25T00:02:11.400Z","dependency_job_id":"5f3444d1-8d4b-44a1-a1b5-d1c70257d465","html_url":"https://github.com/opencodeco/hyperf-opentelemetry","commit_stats":null,"previous_names":["opencodeco/hyperf-opentelemetry"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/opencodeco/hyperf-opentelemetry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencodeco%2Fhyperf-opentelemetry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencodeco%2Fhyperf-opentelemetry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencodeco%2Fhyperf-opentelemetry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencodeco%2Fhyperf-opentelemetry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencodeco","download_url":"https://codeload.github.com/opencodeco/hyperf-opentelemetry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencodeco%2Fhyperf-opentelemetry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-10-04T11:59:41.177Z","updated_at":"2026-01-20T16:27:10.359Z","avatar_url":"https://github.com/opencodeco.png","language":"PHP","readme":"# hyperf-opentelemetry\n\n[![Status](https://img.shields.io/badge/status-beta-yellow)]() [![License](https://img.shields.io/badge/license-MIT-blue.svg)]() [![PHP](https://img.shields.io/badge/php-%3E%3D8.1-777bb4.svg?logo=php\u0026logoColor=white)]() [![Hyperf](https://img.shields.io/badge/framework-Hyperf-green)]() [![OpenTelemetry](https://img.shields.io/badge/observability-OpenTelemetry-orange)]()\n\nInstrumentation library for Hyperf applications with OpenTelemetry support.\n\nThis library enables instrumentation of Hyperf-based applications for exporting metrics, traces, and logs compatible with the OpenTelemetry standard.\n\n---\n\n## ✨ Features\n\n- 📦 Ready-to-use with Swoole and Coroutine\n- 📊 Custom metrics support via Meter\n- 📈 Trace instrumentation for:\n  - HTTP requests (Hyperf\\HttpServer)\n  - Redis\n  - Guzzle\n  - SQL queries (Hyperf\\Database)\n- ♻️ Integration with Swoole ContextStorage\n\n---\n\n## 📦 Installation\n\n```shell\ncomposer require opencodeco/hyperf-opentelemetry\n```\n\n---\n\n## ⚙️ Configuration\n1. Publish the configuration file\n```shell\nphp bin/hyperf.php vendor:publish opencodeco/hyperf-opentelemetry\n```\n\nEdit the file config/autoload/open-telemetry.php to adjust settings (enable/disable features, OTLP endpoints, resource attributes, etc).\n\n2. Configure environment variables\n\nExample .env:\n\n```shell\nOTEL_TRACES_ENDPOINT=http://otelcol:4318/v1/traces\nOTEL_METRICS_ENDPOINT=http://otelcol:4318/v1/metrics\n```\n\n3. Add instrumentation middlewares\n\nconfig/autoload/middlewares.php:\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nuse Hyperf\\OpenTelemetry\\Middleware\\MetricMiddleware;\nuse Hyperf\\OpenTelemetry\\Middleware\\TraceMiddleware;\n\nreturn [\n    'http' =\u003e [\n        MetricMiddleware::class,\n        TraceMiddleware::class,\n    ],\n];\n```\n\n---\n\n## 👨‍💻 Development\nBuild the image\n```shell\nmake build\n```\n\nInstall dependencies\n```shell\nmake install\n```\n\nRun tests\n```shell\nmake test\n```\n\n--- \n\n## 🤝 Contributing\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencodeco%2Fhyperf-opentelemetry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencodeco%2Fhyperf-opentelemetry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencodeco%2Fhyperf-opentelemetry/lists"}