{"id":31444100,"url":"https://github.com/opentelemetry-php/contrib-sampler-aws-xray","last_synced_at":"2026-01-20T16:30:52.274Z","repository":{"id":311842327,"uuid":"1045308035","full_name":"opentelemetry-php/contrib-sampler-aws-xray","owner":"opentelemetry-php","description":"[READONLY] OpenTelemetry AWS X-Ray sampler","archived":false,"fork":false,"pushed_at":"2025-08-27T01:07:41.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-30T20:56:17.471Z","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":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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-27T00:58:44.000Z","updated_at":"2025-08-27T01:04:18.000Z","dependencies_parsed_at":"2025-08-27T08:27:29.458Z","dependency_job_id":"d7517b5e-bc9d-4028-82d6-688a41d7c3f0","html_url":"https://github.com/opentelemetry-php/contrib-sampler-aws-xray","commit_stats":null,"previous_names":["opentelemetry-php/contrib-sampler-aws-xray"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/opentelemetry-php/contrib-sampler-aws-xray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-sampler-aws-xray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-sampler-aws-xray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-sampler-aws-xray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-sampler-aws-xray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentelemetry-php","download_url":"https://codeload.github.com/opentelemetry-php/contrib-sampler-aws-xray/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-sampler-aws-xray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607178,"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-09-30T20:56:12.747Z","updated_at":"2026-01-20T16:30:52.239Z","avatar_url":"https://github.com/opentelemetry-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS X-Ray Sampler\n\nProvides a sampler which can get sampling configurations from AWS X-Ray to make sampling decisions. See: [AWS X-Ray Sampling](https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-sampling)\n\n## Installation\n\n```shell\ncomposer require open-telemetry/sampler-aws-xray\n```\n\n## Configuration\nYou can configure the `AWSXRayRemoteSampler` as per the following example.\nNote that you will need to configure your [OpenTelemetry Collector for\nX-Ray remote sampling](https://aws-otel.github.io/docs/getting-started/remote-sampling).\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nrequire __DIR__ . '/vendor/autoload.php';\n\nuse OpenTelemetry\\SDK\\Trace\\TracerProvider;\nuse OpenTelemetry\\SDK\\Common\\Attribute\\Attributes;\nuse OpenTelemetry\\SDK\\Trace\\SpanExporter\\ConsoleSpanExporterFactory;\nuse OpenTelemetry\\SDK\\Trace\\SpanProcessor\\SimpleSpanProcessor;\nuse OpenTelemetry\\SDK\\Resource\\ResourceInfo;\nuse OpenTelemetry\\Contrib\\Sampler\\Xray\\AWSXRayRemoteSampler;\n\n$resource = ResourceInfo::create(Attributes::create([\n    'service.name'   =\u003e 'MyServiceName',\n    'service.version'=\u003e '1.0.0',\n    'cloud.provider' =\u003e 'aws',\n]));\n\n$xraySampler = new AWSXRayRemoteSampler(\n    $resource,\n    'http://localhost:2000',\n    2\n);\n\n$tracerProvider = TracerProvider::builder()\n    -\u003esetResource($resource)\n    -\u003esetSampler($xraySampler)\n    -\u003eaddSpanProcessor(\n        new SimpleSpanProcessor(\n            (new ConsoleSpanExporterFactory())-\u003ecreate()\n        )\n    )\n    -\u003ebuild();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentelemetry-php%2Fcontrib-sampler-aws-xray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentelemetry-php%2Fcontrib-sampler-aws-xray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentelemetry-php%2Fcontrib-sampler-aws-xray/lists"}