{"id":21424817,"url":"https://github.com/opentelemetry-php/contrib-detector-container","last_synced_at":"2025-07-14T08:31:58.253Z","repository":{"id":163867986,"uuid":"638750974","full_name":"opentelemetry-php/contrib-detector-container","owner":"opentelemetry-php","description":"[READONLY] OpenTelemetry container detector","archived":false,"fork":false,"pushed_at":"2025-03-12T10:23:14.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-29T06:47:29.898Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"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/opentelemetry-php.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-05-10T03:00:39.000Z","updated_at":"2025-02-25T01:30:39.000Z","dependencies_parsed_at":"2023-07-11T07:33:18.610Z","dependency_job_id":"e3420b49-f5ac-440f-b22b-76b4c605694e","html_url":"https://github.com/opentelemetry-php/contrib-detector-container","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/opentelemetry-php/contrib-detector-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-detector-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-detector-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-detector-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-detector-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentelemetry-php","download_url":"https://codeload.github.com/opentelemetry-php/contrib-detector-container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-detector-container/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265262625,"owners_count":23736433,"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","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":"2024-11-22T21:24:43.182Z","updated_at":"2025-07-14T08:31:56.509Z","avatar_url":"https://github.com/opentelemetry-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/contrib-detector-container/releases)\n[![Issues](https://img.shields.io/badge/issues-pink)](https://github.com/open-telemetry/opentelemetry-php/issues)\n[![Source](https://img.shields.io/badge/source-contrib-green)](https://github.com/open-telemetry/opentelemetry-php-contrib/tree/main/src/ResourceDetectors/Container)\n[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php--contrib-blue)](https://github.com/opentelemetry-php/contrib-detector-container)\n[![Latest Version](http://poser.pugx.org/open-telemetry/detector-container/v/unstable)](https://packagist.org/packages/open-telemetry/detector-container/)\n[![Stable](http://poser.pugx.org/open-telemetry/detector-container/v/stable)](https://packagist.org/packages/open-telemetry/detector-container/)\n\nThis is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.\n\n# OpenTelemetry Container Detector\n\nThis package provides an OpenTelemetry `ResourceDetector` which will detect docker container id at runtime, using either V1 (cgroup) or V2 (mountinfo).\nIt should work with docker, kubernetes, and podman containers.\n\n## Requirements\n\n* OpenTelemetry SDK\n\n## Installation via composer\n\n```bash\n$ composer require open-telemetry/detector-container\n```\n\n## Usage\n\nThe detector will be automatically registered as part of composer autoloading.\n\nBy default, all built-in and registered custom resource detectors are used, and will be added to the default resources associated with traces, metrics, and logs.\n\nYou can also provide a list of detectors via the `OTEL_PHP_DETECTORS` config (environment variable or php.ini setting):\n```php\nputenv('OTEL_PHP_DETECTORS=container,env,os,\u003cothers\u003e')\n\nvar_dump(ResourceInfoFactory::defaultResource());\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentelemetry-php%2Fcontrib-detector-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentelemetry-php%2Fcontrib-detector-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentelemetry-php%2Fcontrib-detector-container/lists"}