{"id":18666163,"url":"https://github.com/pccomponentes/apm-guzzle","last_synced_at":"2025-09-15T06:39:06.098Z","repository":{"id":52877490,"uuid":"267514598","full_name":"PcComponentes/apm-guzzle","owner":"PcComponentes","description":"Elastic APM for Guzzle","archived":false,"fork":false,"pushed_at":"2021-04-15T12:54:31.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-05T17:21:36.158Z","etag":null,"topics":["apm","elasticsearch","guzzle","guzzle-middleware","guzzlehttp"],"latest_commit_sha":null,"homepage":"","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/PcComponentes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-28T06:45:12.000Z","updated_at":"2021-04-15T12:51:55.000Z","dependencies_parsed_at":"2022-08-23T21:00:23.015Z","dependency_job_id":null,"html_url":"https://github.com/PcComponentes/apm-guzzle","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/PcComponentes/apm-guzzle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PcComponentes%2Fapm-guzzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PcComponentes%2Fapm-guzzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PcComponentes%2Fapm-guzzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PcComponentes%2Fapm-guzzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PcComponentes","download_url":"https://codeload.github.com/PcComponentes/apm-guzzle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PcComponentes%2Fapm-guzzle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275218754,"owners_count":25425882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"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":["apm","elasticsearch","guzzle","guzzle-middleware","guzzlehttp"],"created_at":"2024-11-07T08:30:46.523Z","updated_at":"2025-09-15T06:39:06.079Z","avatar_url":"https://github.com/PcComponentes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elastic APM for Guzzle\n\nThis library supports Span traces of HTTP calls and distributed traces with [Guzzle](https://github.com/guzzle/guzzle).\n\n## Installation\n\n1) Install via [composer](https://getcomposer.org/)\n\n    ```shell script\n    composer require pccomponentes/apm-guzzle\n    ```\n\n## Usage\n\nIn all cases, an already created instance of [ElasticApmTracer](https://github.com/zoilomora/elastic-apm-agent-php) is assumed.\n\n### Native PHP\n\n```php\n\u003c?php\ndeclare(strict_types=1);\n\n$apmMiddleware = PcComponentes\\ElasticAPM\\GuzzleHttp\\ElasticApmMiddleware::trace(\n    $apmTracer, /** \\ZoiloMora\\ElasticAPM\\ElasticApmTracer instance. */\n);\n\n$handler = GuzzleHttp\\HandlerStack::create();\n$handler-\u003epush($apmMiddleware);\n\n$config = [\n    'handler' =\u003e $handler,\n];\n\n$client = new GuzzleHttp\\Client($config);\n```\n\n### Service Container (Symfony)\n\n```yaml\nhttp.client:\n  class: GuzzleHttp\\Client\n  arguments:\n    $config:\n      handler: '@guzzle.handler'\n\nguzzle.handler:\n  class: GuzzleHttp\\HandlerStack\n  factory: 'GuzzleHttp\\HandlerStack::create'\n  calls:\n    - method: push\n      arguments: ['@guzzle.middleware.apm', 'trace']\n\nguzzle.middleware.apm:\n  class: Closure\n  factory: 'PcComponentes\\ElasticAPM\\GuzzleHttp\\ElasticApmMiddleware::trace'\n  arguments:\n    $elasticApmTracer: '@apm.tracer' # \\ZoiloMora\\ElasticAPM\\ElasticApmTracer instance.\n```\n\n## License\nLicensed under the [MIT license](http://opensource.org/licenses/MIT)\n\nRead [LICENSE](LICENSE) for more information\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpccomponentes%2Fapm-guzzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpccomponentes%2Fapm-guzzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpccomponentes%2Fapm-guzzle/lists"}