{"id":31444099,"url":"https://github.com/opentelemetry-php/contrib-auto-session","last_synced_at":"2026-01-20T16:26:17.966Z","repository":{"id":314171259,"uuid":"1053166327","full_name":"opentelemetry-php/contrib-auto-session","owner":"opentelemetry-php","description":"[READONLY] OpenTelemetry session instrumentation","archived":false,"fork":false,"pushed_at":"2025-09-09T04:50:48.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-30T20:56:14.079Z","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-09T04:48:04.000Z","updated_at":"2025-09-09T04:49:24.000Z","dependencies_parsed_at":"2025-09-11T01:54:54.353Z","dependency_job_id":"7703b3b2-39f8-41d9-a130-3d70c94bbc05","html_url":"https://github.com/opentelemetry-php/contrib-auto-session","commit_stats":null,"previous_names":["opentelemetry-php/contrib-auto-session"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/opentelemetry-php/contrib-auto-session","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-auto-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-auto-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-auto-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-auto-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentelemetry-php","download_url":"https://codeload.github.com/opentelemetry-php/contrib-auto-session/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentelemetry-php%2Fcontrib-auto-session/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607025,"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:08.237Z","updated_at":"2026-01-20T16:26:17.919Z","avatar_url":"https://github.com/opentelemetry-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Session Auto-instrumentation for OpenTelemetry\n\nThis package provides auto-instrumentation for PHP's native session functions.\n\n## Installation\n\n```bash\ncomposer require open-telemetry/opentelemetry-auto-session\n```\n\n## Usage\n\nThe instrumentation hooks into PHP's native session functions to provide tracing capabilities. It automatically creates spans for session operations like `session_start()` and `session_destroy()`.\n\n```php\n\u003c?php\n// Make sure to initialize the OpenTelemetry SDK before using sessions\n// ...\n\n// Register the PHP Session instrumentation\n\\OpenTelemetry\\Contrib\\Instrumentation\\PhpSession\\PhpSessionInstrumentation::register();\n\n// Now any session operations will be automatically traced\nsession_start();\n// ... your code ...\nsession_destroy();\n```\n\n## Spans and Attributes\n\n### session.start\n\nWhen `session_start()` is called, a span named `session.start` is created with the following attributes:\n\n- `code.function_name`: The function name (`session_start`)\n- `php.session.options.*`: Any options passed to `session_start()`\n- `php.session.id`: The session ID (if session was successfully started)\n- `php.session.name`: The session name (if session was successfully started)\n- `php.session.status`: Either \"active\" or \"inactive\"\n- `php.session.cookie.*`: Session cookie parameters\n\n### session.destroy\n\nWhen `session_destroy()` is called, a span named `session.destroy` is created with the following attributes:\n\n- `code.function_name`: The function name (`session_destroy`)\n- `php.session.id`: The session ID (if available)\n- `php.session.name`: The session name (if available)\n\n### session.write_close\n\nWhen `session_write_close()` is called, a span named `session.write_close` is created with the following attributes:\n\n- `code.function.name`: The function name (`session_write_close`)\n- `php.session.id`: The session ID (if available)\n- `php.session.name`: The session name (if available)\n\n### session.unset\n\nWhen `session_unset()` is called, a span named `session.unset` is created with the following attributes:\n\n- `code.function.name`: The function name (`session_unset`)\n- `php.session.id`: The session ID (if available)\n- `php.session.name`: The session name (if available)\n\n### session.abort\n\nWhen `session_abort()` is called, a span named `session.abort` is created with the following attributes:\n\n- `code.function.name`: The function name (`session_abort`)\n- `php.session.id`: The session ID (if available)\n- `php.session.name`: The session name (if available)\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentelemetry-php%2Fcontrib-auto-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentelemetry-php%2Fcontrib-auto-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentelemetry-php%2Fcontrib-auto-session/lists"}