{"_id":"@playwright-labs/reporter-otel","_rev":"10-e8172e3b44ffbab056d993c348645b80","name":"@playwright-labs/reporter-otel","dist-tags":{"latest":"1.4.1"},"versions":{"1.0.0":{"name":"@playwright-labs/reporter-otel","version":"1.0.0","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","_id":"@playwright-labs/reporter-otel@1.0.0","maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"dist":{"shasum":"fae635cab58a349690b793be53c77cbe13dce171","tarball":"https://registry.npmjs.org/@playwright-labs/reporter-otel/-/reporter-otel-1.0.0.tgz","fileCount":8,"integrity":"sha512-0oQwTJ9+x/SOjEp5QaSXOTt4mevOreG6TrGVPwLAGovHHtOw5iUWJR9OcoMsdQHfxQxhVM0X8y2K482oKYZ8TA==","signatures":[{"sig":"MEUCIQCsFozZ55TKApS7tXwEhDXWb9bfpa6rj0AVbBCuXQmEsAIgb2AZE6fA12zkhbAJAOfaD4xQI73K0dIzMNwfcbpu4zY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63277},"main":"dist/index.cjs","type":"module","_from":"file:playwright-labs-reporter-otel-1.0.0.tgz","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"build":"tsup","package:pack":"pnpm exec npm pack","package:pack:dry-run":"pnpm package:pack --dry-run"},"_npmUser":{"name":"vitalicset","email":"vitalicset@yandex.ru"},"_resolved":"/tmp/d56a830b9a46ab09c4ddefa7dc4155a4/playwright-labs-reporter-otel-1.0.0.tgz","_integrity":"sha512-0oQwTJ9+x/SOjEp5QaSXOTt4mevOreG6TrGVPwLAGovHHtOw5iUWJR9OcoMsdQHfxQxhVM0X8y2K482oKYZ8TA==","_npmVersion":"10.8.2","description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/sdk-node":"^0.214.0","@opentelemetry/resources":"^2.6.0","@playwright-labs/otel-core":"1.0.0","@opentelemetry/semantic-conventions":"^1.28.0"},"_hasShrinkwrap":false,"devDependencies":{"@playwright/test":"1.57.0"},"peerDependencies":{"@playwright/test":">=1.13.0"},"_npmOperationalInternal":{"tmp":"tmp/reporter-otel_1.0.0_1776194422275_0.39708094010483164","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@playwright-labs/reporter-otel","version":"1.0.1","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","_id":"@playwright-labs/reporter-otel@1.0.1","maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"dist":{"shasum":"8941245479502c5ee68b8bff0b3d2a7e16db179c","tarball":"https://registry.npmjs.org/@playwright-labs/reporter-otel/-/reporter-otel-1.0.1.tgz","fileCount":8,"integrity":"sha512-i8eZmqA6XqWeHjWycr53TxQ3czbuCTim0HMIIgXTIlVXKiC3AZ7hD5VPfyVu7CgVo/IFSM2iO+cjvWI8VOLxfg==","signatures":[{"sig":"MEQCIGnfT5bleEf9Xypo35ur3ppV+yanfdCRG4kf7SBJ3bm3AiAHPkCt1ruzqvH6qimgtKm+PA9MC8WEwHEyOdD6tfWraA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63377},"main":"dist/index.cjs","type":"module","_from":"file:playwright-labs-reporter-otel-1.0.1.tgz","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"build":"tsup","package:pack":"pnpm exec npm pack","package:pack:dry-run":"pnpm package:pack --dry-run"},"_npmUser":{"name":"vitalicset","email":"vitalicset@yandex.ru"},"_resolved":"/tmp/55e8ee7dae5746610b9a23aad3ab11e9/playwright-labs-reporter-otel-1.0.1.tgz","_integrity":"sha512-i8eZmqA6XqWeHjWycr53TxQ3czbuCTim0HMIIgXTIlVXKiC3AZ7hD5VPfyVu7CgVo/IFSM2iO+cjvWI8VOLxfg==","_npmVersion":"10.8.2","description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/sdk-node":"^0.214.0","@opentelemetry/resources":"^2.6.0","@playwright-labs/otel-core":"1.0.1","@opentelemetry/semantic-conventions":"^1.28.0"},"_hasShrinkwrap":false,"devDependencies":{"@playwright/test":"1.57.0"},"peerDependencies":{"@playwright/test":">=1.13.0"},"_npmOperationalInternal":{"tmp":"tmp/reporter-otel_1.0.1_1776250757135_0.6324727806486072","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@playwright-labs/reporter-otel","version":"1.1.0","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","_id":"@playwright-labs/reporter-otel@1.1.0","maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"dist":{"shasum":"bde20ac78257d390b66eb954c47b7af97daae342","tarball":"https://registry.npmjs.org/@playwright-labs/reporter-otel/-/reporter-otel-1.1.0.tgz","fileCount":8,"integrity":"sha512-eRfTEBt4R6meR3UF4vOCRUCeKa1zTZFnoQTCns6staPlRnnO6e3Hgw5+RcIapbZg5Ke7b6viFt4g3oGKZtmKBQ==","signatures":[{"sig":"MEUCIGdKNEn8M+DSr8t28HF1RWjIOOdFYgnMXIJnR5cmCmx/AiEApGYrTMmRUKoar24I9DRurWPlw4US91mCfMqmEi03O8E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76872},"main":"dist/index.cjs","type":"module","_from":"file:playwright-labs-reporter-otel-1.1.0.tgz","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"test":"playwright test","build":"tsup","package:pack":"pnpm exec npm pack","package:pack:dry-run":"pnpm package:pack --dry-run"},"_npmUser":{"name":"vitalicset","email":"vitalicset@yandex.ru"},"_resolved":"/tmp/351d24c2c79b644911dc23ec0f268ba8/playwright-labs-reporter-otel-1.1.0.tgz","_integrity":"sha512-eRfTEBt4R6meR3UF4vOCRUCeKa1zTZFnoQTCns6staPlRnnO6e3Hgw5+RcIapbZg5Ke7b6viFt4g3oGKZtmKBQ==","_npmVersion":"10.8.2","description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/sdk-node":"^0.214.0","@opentelemetry/resources":"^2.6.0","@playwright-labs/otel-core":"1.1.0","@opentelemetry/semantic-conventions":"^1.28.0"},"_hasShrinkwrap":false,"devDependencies":{"@playwright/test":"1.57.0"},"peerDependencies":{"@playwright/test":">=1.13.0"},"_npmOperationalInternal":{"tmp":"tmp/reporter-otel_1.1.0_1779269534835_0.45616329151292345","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@playwright-labs/reporter-otel","version":"1.1.1","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","_id":"@playwright-labs/reporter-otel@1.1.1","maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"dist":{"shasum":"3b6ed7715e46803c9740bc611e7beef7a714b196","tarball":"https://registry.npmjs.org/@playwright-labs/reporter-otel/-/reporter-otel-1.1.1.tgz","fileCount":8,"integrity":"sha512-tyOZz2ipfcr2FXB/GtS0gFVTjfAJH8neVsj3ybiw75yRIPsjNMado3PTAw9cnmX+kPLoMNBJAfSKWF5WCbrJaw==","signatures":[{"sig":"MEYCIQCa4+ZKdjr/J3aU4zrnYL7Ia4coKqoQCIBXXnwyzg6SmAIhAN8P2gg1/NFY+4kRQAjVwjQETaaDkZ+oVKbPGGsk4wOr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77570},"main":"dist/index.cjs","type":"module","_from":"file:playwright-labs-reporter-otel-1.1.1.tgz","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"test":"playwright test","build":"tsup","package:pack":"pnpm exec npm pack","package:pack:dry-run":"pnpm package:pack --dry-run"},"_npmUser":{"name":"vitalicset","email":"vitalicset@yandex.ru"},"_resolved":"/tmp/ec7420daa535b5ca8cdc3261ab8928b4/playwright-labs-reporter-otel-1.1.1.tgz","_integrity":"sha512-tyOZz2ipfcr2FXB/GtS0gFVTjfAJH8neVsj3ybiw75yRIPsjNMado3PTAw9cnmX+kPLoMNBJAfSKWF5WCbrJaw==","_npmVersion":"10.8.2","description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/sdk-node":"^0.217.0","@opentelemetry/resources":"^2.6.0","@playwright-labs/otel-core":"1.1.1","@opentelemetry/semantic-conventions":"^1.28.0"},"_hasShrinkwrap":false,"devDependencies":{"@playwright/test":"1.57.0"},"peerDependencies":{"@playwright/test":">=1.13.0"},"_npmOperationalInternal":{"tmp":"tmp/reporter-otel_1.1.1_1779347182517_0.6141202774228594","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@playwright-labs/reporter-otel","version":"1.2.0","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","_id":"@playwright-labs/reporter-otel@1.2.0","maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"dist":{"shasum":"b30bb9f6bdc3416243b96779cf7c41566bd5b9bb","tarball":"https://registry.npmjs.org/@playwright-labs/reporter-otel/-/reporter-otel-1.2.0.tgz","fileCount":8,"integrity":"sha512-b6PUKOMvhj+p1B0i0ckkso0marNj0WI+qyOR7jO5jZ7sEjhBt/sWTrQGx5F8WdRsLTufyLauMRI2K9q58e7MVQ==","signatures":[{"sig":"MEUCIQCyHHntqPuth+CUmj8MTzhvvl8eNq3NeWeCR9PKvons1wIgZeXd4EPnrX7K161caJ5UJIIFVpROOnDUFLCigBYq20c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":87073},"main":"dist/index.cjs","type":"module","_from":"file:playwright-labs-reporter-otel-1.2.0.tgz","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"test":"playwright test","build":"tsup","package:pack":"pnpm exec npm pack","package:pack:dry-run":"pnpm package:pack --dry-run"},"_npmUser":{"name":"vitalicset","email":"vitalicset@yandex.ru"},"_resolved":"/tmp/a301fe132e1049ccd4c01f45223d940c/playwright-labs-reporter-otel-1.2.0.tgz","_integrity":"sha512-b6PUKOMvhj+p1B0i0ckkso0marNj0WI+qyOR7jO5jZ7sEjhBt/sWTrQGx5F8WdRsLTufyLauMRI2K9q58e7MVQ==","_npmVersion":"10.8.2","description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/sdk-node":"^0.217.0","@opentelemetry/resources":"^2.6.0","@playwright-labs/otel-core":"1.1.1","@opentelemetry/semantic-conventions":"^1.28.0"},"_hasShrinkwrap":false,"devDependencies":{"@playwright/test":"1.57.0"},"peerDependencies":{"@playwright/test":">=1.13.0"},"_npmOperationalInternal":{"tmp":"tmp/reporter-otel_1.2.0_1784555047992_0.9362948015122021","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@playwright-labs/reporter-otel","version":"1.2.1","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","_id":"@playwright-labs/reporter-otel@1.2.1","maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"dist":{"shasum":"1103ed64ce7ef3b61be549e2e763b0dd2f30c6ed","tarball":"https://registry.npmjs.org/@playwright-labs/reporter-otel/-/reporter-otel-1.2.1.tgz","fileCount":8,"integrity":"sha512-iJL01arxFhkotygGVWdp/wxrkkw/2nm4iScsJ5oMB5KBlUsM5Qsty8YKkb59KC3gpl7XPkzO3fC/J8eYtG5F2A==","signatures":[{"sig":"MEUCIB/BXl13uoYRhZ+ggXFp3Voo1iJZ5gCkjRyUqfqmsoBjAiEA59g9JD46WxSqtdWsM5HsyK7fT7S00e5+dN2yjStfups=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88444},"main":"dist/index.cjs","type":"module","_from":"file:playwright-labs-reporter-otel-1.2.1.tgz","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"test":"playwright test","build":"tsup","package:pack":"pnpm exec npm pack","package:pack:dry-run":"pnpm package:pack --dry-run"},"_npmUser":{"name":"vitalicset","email":"vitalicset@yandex.ru"},"_resolved":"/tmp/45a00070ae930e4168f95c822e937993/playwright-labs-reporter-otel-1.2.1.tgz","_integrity":"sha512-iJL01arxFhkotygGVWdp/wxrkkw/2nm4iScsJ5oMB5KBlUsM5Qsty8YKkb59KC3gpl7XPkzO3fC/J8eYtG5F2A==","_npmVersion":"10.8.2","description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/sdk-node":"^0.217.0","@opentelemetry/resources":"^2.6.0","@playwright-labs/otel-core":"1.1.1","@opentelemetry/semantic-conventions":"^1.28.0"},"_hasShrinkwrap":false,"devDependencies":{"@playwright/test":"1.57.0"},"peerDependencies":{"@playwright/test":">=1.13.0"},"_npmOperationalInternal":{"tmp":"tmp/reporter-otel_1.2.1_1784568567338_0.7817371109515661","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@playwright-labs/reporter-otel","version":"1.2.2","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","_id":"@playwright-labs/reporter-otel@1.2.2","maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"dist":{"shasum":"ec84939a6566b23c052dae0032de6100854b27a0","tarball":"https://registry.npmjs.org/@playwright-labs/reporter-otel/-/reporter-otel-1.2.2.tgz","fileCount":8,"integrity":"sha512-HByXMgCmFF10HK5mZ537mhrCW5xNvucaIIfL5h1drHihOrDyOfXYfFF+Us2ZRSZsto9Jv5CK2p3lip5NYSQMeg==","signatures":[{"sig":"MEQCIDv+pjYMWc//gKGgtK+TIrOvPykcd1vNibXabsCNhQUMAiAdYtI9J8GxzM/EPlV5UmNf1BFCqj5pfIKSHe42GyXAeg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90318},"main":"dist/index.cjs","type":"module","_from":"file:playwright-labs-reporter-otel-1.2.2.tgz","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"test":"playwright test","build":"tsup","package:pack":"pnpm exec npm pack","package:pack:dry-run":"pnpm package:pack --dry-run"},"_npmUser":{"name":"vitalicset","email":"vitalicset@yandex.ru"},"_resolved":"/tmp/5559c266503ce6050fe64e7654efddd4/playwright-labs-reporter-otel-1.2.2.tgz","_integrity":"sha512-HByXMgCmFF10HK5mZ537mhrCW5xNvucaIIfL5h1drHihOrDyOfXYfFF+Us2ZRSZsto9Jv5CK2p3lip5NYSQMeg==","_npmVersion":"10.8.2","description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/sdk-node":"^0.217.0","@opentelemetry/resources":"^2.6.0","@playwright-labs/otel-core":"1.1.1","@playwright-labs/reporter-core":"1.0.0","@opentelemetry/semantic-conventions":"^1.28.0"},"_hasShrinkwrap":false,"devDependencies":{"@playwright/test":"1.57.0"},"peerDependencies":{"@playwright/test":">=1.13.0"},"_npmOperationalInternal":{"tmp":"tmp/reporter-otel_1.2.2_1784637144528_0.4494315990490283","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@playwright-labs/reporter-otel","version":"1.3.0","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","_id":"@playwright-labs/reporter-otel@1.3.0","maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"dist":{"shasum":"9b5a7ccd8e10fa14688077e078772598a2ecb2b2","tarball":"https://registry.npmjs.org/@playwright-labs/reporter-otel/-/reporter-otel-1.3.0.tgz","fileCount":8,"integrity":"sha512-9cUlZlxrszMcOh4sG0J45T9NQYgBK1pOr1F+3KcOAPaf0Hti+kouY2+1f8vaReQlg8VFB8QqKSbprvhZYampeA==","signatures":[{"sig":"MEUCICYSgo2LCy0SOsvByhBAxQHo7+eAWg2Y8lt5smqrUT5tAiEAkotlYvftxvaUWjfNuesKrGWDmP3JXhB7hhsm8Y/7vZw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":93895},"main":"dist/index.cjs","type":"module","_from":"file:playwright-labs-reporter-otel-1.3.0.tgz","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"test":"playwright test","build":"tsup","package:pack":"pnpm exec npm pack","package:pack:dry-run":"pnpm package:pack --dry-run"},"_npmUser":{"name":"vitalicset","email":"vitalicset@yandex.ru"},"_resolved":"/tmp/33ec9555c6c2949f20e51606f4d9be7d/playwright-labs-reporter-otel-1.3.0.tgz","_integrity":"sha512-9cUlZlxrszMcOh4sG0J45T9NQYgBK1pOr1F+3KcOAPaf0Hti+kouY2+1f8vaReQlg8VFB8QqKSbprvhZYampeA==","_npmVersion":"10.8.2","description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/sdk-node":"^0.217.0","@opentelemetry/resources":"^2.6.0","@playwright-labs/otel-core":"1.1.1","@playwright-labs/reporter-core":"1.1.0","@opentelemetry/semantic-conventions":"^1.28.0"},"_hasShrinkwrap":false,"devDependencies":{"@playwright/test":"1.57.0"},"peerDependencies":{"@playwright/test":">=1.13.0"},"_npmOperationalInternal":{"tmp":"tmp/reporter-otel_1.3.0_1784666096098_0.9004216178589668","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@playwright-labs/reporter-otel","version":"1.4.0","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","_id":"@playwright-labs/reporter-otel@1.4.0","maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"dist":{"shasum":"6076bbbc327af6f52e54351141c92814e1a8ce56","tarball":"https://registry.npmjs.org/@playwright-labs/reporter-otel/-/reporter-otel-1.4.0.tgz","fileCount":8,"integrity":"sha512-qy4AZ7+zyxJY5dw88QkoSH9YeQsAsPv5WN0zFuWZVI3cpqgeKCZBwWGLSy2G+db5KfhYIhxFMsmytOnMBfUfcQ==","signatures":[{"sig":"MEUCIQD4e2xPQHPmBZhtJ3s2eSm6xCiqkmvazlD8PTWMddUunwIgdOsmc6Qz4clSBiu90BPVMA5GC6kUviczFihIgLGLkxg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96079},"main":"dist/index.cjs","type":"module","_from":"file:playwright-labs-reporter-otel-1.4.0.tgz","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"test":"playwright test","build":"tsup","package:pack":"pnpm exec npm pack","package:pack:dry-run":"pnpm package:pack --dry-run"},"_npmUser":{"name":"vitalicset","email":"vitalicset@yandex.ru"},"_resolved":"/tmp/7f08ab8b70cdca1132b9aef71dd78b9f/playwright-labs-reporter-otel-1.4.0.tgz","_integrity":"sha512-qy4AZ7+zyxJY5dw88QkoSH9YeQsAsPv5WN0zFuWZVI3cpqgeKCZBwWGLSy2G+db5KfhYIhxFMsmytOnMBfUfcQ==","_npmVersion":"10.8.2","description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/sdk-node":"^0.217.0","@opentelemetry/resources":"^2.6.0","@playwright-labs/otel-core":"1.2.0","@playwright-labs/reporter-core":"1.1.0","@opentelemetry/semantic-conventions":"^1.28.0"},"_hasShrinkwrap":false,"devDependencies":{"@playwright/test":"1.57.0"},"peerDependencies":{"@playwright/test":">=1.13.0"},"_npmOperationalInternal":{"tmp":"tmp/reporter-otel_1.4.0_1784750227497_0.03659305079425024","host":"s3://npm-registry-packages-npm-production"}},"1.4.1":{"name":"@playwright-labs/reporter-otel","version":"1.4.1","description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","type":"module","main":"dist/index.cjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"peerDependencies":{"@playwright/test":">=1.13.0"},"dependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-node":"^0.217.0","@opentelemetry/semantic-conventions":"^1.28.0","@playwright-labs/otel-core":"1.2.0","@playwright-labs/reporter-core":"1.2.0"},"devDependencies":{"@playwright/test":"1.57.0"},"scripts":{"build":"tsup","test":"playwright test","package:pack":"pnpm exec npm pack","package:pack:dry-run":"pnpm package:pack --dry-run"},"_id":"@playwright-labs/reporter-otel@1.4.1","_integrity":"sha512-1QheBJopRPbQ4RITmDfdroLae5d0tIX9DlmCMz+HiWcre+gNluG5Pr0HodDP/eCpEJEsFVCG3/5Mo+eCaJHDfQ==","_resolved":"/tmp/7569e652ce6f4754616a2ec6fccde5b9/playwright-labs-reporter-otel-1.4.1.tgz","_from":"file:playwright-labs-reporter-otel-1.4.1.tgz","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-1QheBJopRPbQ4RITmDfdroLae5d0tIX9DlmCMz+HiWcre+gNluG5Pr0HodDP/eCpEJEsFVCG3/5Mo+eCaJHDfQ==","shasum":"851aaa6e81b3c1f973b2ae97a4497db20c762ca2","tarball":"https://registry.npmjs.org/@playwright-labs/reporter-otel/-/reporter-otel-1.4.1.tgz","fileCount":8,"unpackedSize":96183,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDsI3OKFeiGWlDyTlc6weuFieg+wApCt8J2Usz4DoP/4AiEAispgf0dnwLnTlomMU6qVuNcQ75Ogiiq1+LYq8GLWcJQ="}]},"_npmUser":{"name":"vitalicset","email":"vitalicset@yandex.ru"},"directories":{},"maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/reporter-otel_1.4.1_1786104179332_0.09788735991159592"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-14T19:20:22.165Z","modified":"2026-08-07T12:02:59.630Z","1.0.0":"2026-04-14T19:20:22.457Z","1.0.1":"2026-04-15T10:59:17.266Z","1.1.0":"2026-05-20T09:32:14.976Z","1.1.1":"2026-05-21T07:06:22.662Z","1.2.0":"2026-07-20T13:44:08.123Z","1.2.1":"2026-07-20T17:29:27.488Z","1.2.2":"2026-07-21T12:32:24.674Z","1.3.0":"2026-07-21T20:34:56.251Z","1.4.0":"2026-07-22T19:57:07.638Z","1.4.1":"2026-08-07T12:02:59.473Z"},"author":{"name":"Vitali Haradkou","email":"vitalicset@yandex.ru"},"license":"MIT","keywords":["playwright","reporter","opentelemetry","otel","otlp","metrics","traces","monitoring","grafana","playwright-labs"],"description":"OpenTelemetry reporter for Playwright — send test metrics and traces to any OTEL-compatible backend","maintainers":[{"name":"vitalicset","email":"vitalicset@yandex.ru"}],"readme":"# @playwright-labs/reporter-otel\n\nOpenTelemetry reporter for [Playwright](https://playwright.dev). Sends test traces and metrics to any OTLP-compatible backend — Jaeger, Grafana Tempo, Prometheus (via OTel Collector), Datadog, and more.\n\n## Packages\n\nThis feature is split across two packages:\n\n| Package | Description |\n|---|---|\n| **`@playwright-labs/reporter-otel`** | Playwright reporter — exports built-in traces and metrics |\n| **`@playwright-labs/fixture-otel`** | `test` and `expect` extensions — `useCounter`, `useHistogram`, `useSpan`, custom matchers |\n\nInstall only what you need:\n\n```bash\n# Reporter only (traces + built-in metrics)\nnpm install @playwright-labs/reporter-otel\n\n# Reporter + custom fixture support\nnpm install @playwright-labs/reporter-otel @playwright-labs/fixture-otel\n```\n\n## Features\n\n- Exports **distributed traces** — every test and step becomes a span visible in Jaeger / Tempo\n- Exports **built-in Playwright metrics** — results, durations, retries, attachments, errors\n- Captures **browser and project metadata** — browser name, channel, viewport, locale, headless mode\n- Captures **host identity** — username, hostname, IP address, OS platform\n- Monitors **Node.js process internals** — heap, RSS, CPU\n- **Trace propagation** via `useTraceparent` — generate a single W3C `traceparent` per test and forward it to every downstream service call, so Playwright spans and service spans appear in the same trace\n- **Custom metrics** via `@playwright-labs/fixture-otel` — `Counter`, `Histogram`, `UpDownCounter`\n- **Custom spans** via `useSpan` fixture — child spans nested under the test span\n- **Custom expect matchers** — `toBeOtelMetricCollected`, `toHaveOtelCallCount`, `toBeOtelSpanEnded`\n- `Symbol.dispose` support — use `using` for deterministic metric/span cleanup\n- Configurable OTEL collector endpoint, auth, headers, and metric prefix\n\n## Requirements\n\n- Playwright >= 1.13.0\n- Node.js >= 18\n- An OpenTelemetry Collector with OTLP/HTTP receiver (default port `4318`)\n\n## Setup\n\n### 1. Configure the reporter\n\n```typescript\n// playwright.config.ts\nimport { defineConfig } from \"@playwright/test\";\nimport { type OtelReporterOptions } from \"@playwright-labs/reporter-otel\";\n\nexport default defineConfig({\n  reporter: [\n    [\n      \"@playwright-labs/reporter-otel\",\n      {\n        host: \"localhost\",\n        port: 4318,\n      } satisfies OtelReporterOptions,\n    ],\n  ],\n});\n```\n\n### 2. (Optional) Add custom metrics and spans\n\nInstall `@playwright-labs/fixture-otel` and import its extended `test` and `expect`:\n\n```typescript\n// tests/fixtures.ts — re-export for your test files\nexport { test, expect } from \"@playwright-labs/fixture-otel\";\n```\n\nOr extend your own fixtures:\n\n```typescript\nimport { test as otelTest } from \"@playwright-labs/fixture-otel\";\nimport { type MyFixtures, myFixtures } from \"./my-fixtures\";\n\nexport const test = otelTest.extend<MyFixtures>(myFixtures);\nexport { expect } from \"@playwright-labs/fixture-otel\";\n```\n\n## Configuration\n\nAll options are optional.\n\n| Option | Type | Default | Description |\n|---|---|---|---|\n| `host` | `string` | `'localhost'` | OTEL collector hostname |\n| `port` | `number` | `4318` | OTEL collector port (OTLP/HTTP) |\n| `protocol` | `'http' \\| 'https'` | `'http'` | Connection protocol |\n| `headers` | `Record<string, string>` | `{}` | Extra HTTP headers (API keys, tenant IDs) |\n| `auth.username` | `string` | — | Basic auth username |\n| `auth.password` | `string` | — | Basic auth password |\n| `prefix` | `string` | `'pw_'` | Prefix added to all built-in metric names |\n| `resourceAttributes` | `Record<string, string \\| number \\| boolean>` | `{}` | Extra OTel resource attributes |\n| `env` | `Record<string, string \\| undefined>` | `{}` | Env vars exposed as `env.<key>` resource attributes |\n| `exportIntervalMillis` | `number` | `60000` | How often to push metrics (ms); a flush always runs on exit |\n\n### Examples\n\n**Remote collector with auth:**\n\n```typescript\nexport default defineConfig({\n  reporter: [\n    [\n      \"@playwright-labs/reporter-otel\",\n      {\n        host: \"otel-collector.internal\",\n        port: 4318,\n        protocol: \"https\",\n        auth: {\n          username: process.env.OTEL_USERNAME,\n          password: process.env.OTEL_PASSWORD,\n        },\n        headers: { \"X-Scope-OrgID\": \"my-team\" },\n      },\n    ],\n  ],\n});\n```\n\n**With CI metadata:**\n\n```typescript\nexport default defineConfig({\n  reporter: [\n    [\n      \"@playwright-labs/reporter-otel\",\n      {\n        host: \"localhost\",\n        port: 4318,\n        prefix: \"e2e_\",\n        resourceAttributes: {\n          \"deployment.environment\": process.env.ENVIRONMENT ?? \"local\",\n          \"service.version\": process.env.APP_VERSION ?? \"0.0.0\",\n        },\n        env: {\n          CI: process.env.CI,\n          BUILD_ID: process.env.BUILD_ID,\n          BRANCH: process.env.GIT_BRANCH,\n        },\n      },\n    ],\n  ],\n});\n```\n\n**Grafana Cloud OTLP endpoint:**\n\n```typescript\nexport default defineConfig({\n  reporter: [\n    [\n      \"@playwright-labs/reporter-otel\",\n      {\n        host: \"otlp-gateway-prod-eu-west-0.grafana.net\",\n        port: 443,\n        protocol: \"https\",\n        auth: {\n          username: process.env.GRAFANA_INSTANCE_ID,\n          password: process.env.GRAFANA_API_KEY,\n        },\n      },\n    ],\n  ],\n});\n```\n\n## Built-in Metrics\n\nAll metric names are prefixed with `prefix` (default `pw_`).  \nThe OTel Collector's Prometheus exporter appends a unit suffix: `ms` → `_milliseconds`, `bytes` → `_bytes`, `us` → `_microseconds`.\n\n| Metric (OTel name) | Prometheus name | Type | Attributes |\n|---|---|---|---|\n| `pw_tests_total` | `pw_tests_total` | Counter | `test.status`, `test.result`, `test.suite`, `test.project`, `browser.name`, `browser.channel`, `browser.headless`, `browser.viewport`, `browser.locale` |\n| `pw_test_duration` | `pw_test_duration_milliseconds_bucket/sum/count` | Histogram (ms) | same as above |\n| `pw_test_retries` | `pw_test_retries_total` | Counter | `test.suite` |\n| `pw_test_attachment_count` | `pw_test_attachment_count_total` | Counter | `attachment.content_type` |\n| `pw_test_attachment_size` | `pw_test_attachment_size_bytes_bucket/sum/count` | Histogram (bytes) | — |\n| `pw_test_error_count` | `pw_test_error_count_total` | Counter | `error.location`, `error.message` |\n| `pw_test_step_count` | `pw_test_step_count_total` | Counter | `test.step.category`, `test.suite`, `test.project`, `browser.name`, `browser.channel`, `browser.headless`, `browser.viewport`, `browser.locale` |\n| `pw_test_step_duration` | `pw_test_step_duration_milliseconds_bucket/sum/count` | Histogram (ms) | same as above |\n| `pw_test_annotation_count` | `pw_test_annotation_count_total` | Counter | `annotation.type`, `test.suite` |\n| `pw_run_duration` | `pw_run_duration_milliseconds_bucket/sum/count` | Histogram (ms) | — |\n| `pw_expect_poll_total` | `pw_expect_poll_total_total` | Counter | `expect.poll.outcome` (`pass`/`timeout`), `test.suite`, project/browser |\n| `pw_expect_poll_attempts` | `pw_expect_poll_attempts_attempts_bucket/sum/count` | Histogram (attempts) | same as above |\n| `pw_expect_poll_duration` | `pw_expect_poll_duration_milliseconds_bucket/sum/count` | Histogram (ms) | same as above |\n| `pw_process_memory_heap_used` | `pw_process_memory_heap_used_bytes` | Gauge | — |\n| `pw_process_memory_heap_total` | `pw_process_memory_heap_total_bytes` | Gauge | — |\n| `pw_process_memory_rss` | `pw_process_memory_rss_bytes` | Gauge | — |\n| `pw_os_memory_free` | `pw_os_memory_free_bytes` | Gauge | — |\n| `pw_process_cpu_user` | `pw_process_cpu_user_microseconds` | Gauge | — |\n| `pw_process_cpu_system` | `pw_process_cpu_system_microseconds` | Gauge | — |\n\n### Resource attributes (on every signal)\n\nThe reporter attaches these as OTel resource attributes (available in `target_info` in Prometheus):\n\n| Attribute | Value |\n|---|---|\n| `host.user` | OS username (`os.userInfo().username`) |\n| `host.name` | Machine hostname |\n| `host.ip` | First non-loopback IPv4 address |\n| `os.platform` | `darwin`, `linux`, `win32`, … |\n| `os.arch` | CPU architecture |\n| `playwright.workers` | Number of workers |\n| `playwright.config_file` | Path to `playwright.config.ts` |\n| `process.runtime.name` | Detected runtime: `nodejs`, `bun`, or `deno` (via `process.versions`) |\n| `process.runtime.version` | Version of the detected runtime |\n| `process.runtime.versions.*` | Full runtime component versions (`process.runtime.versions.node`, `.v8`, `.openssl`, …; `.bun` under Bun, `.deno` under Deno) |\n\n## Traces\n\nEvery test produces a root span. Every Playwright step produces a child span.  \nAdditional spans from `useSpan` appear as further children of the test span.\n\n> **Implementation note**: the test span is created at the end of the test (not at `onTestBegin`), so that annotations pushed during the test — including `pw_otel.traceparent` — are available when the span context is resolved. All timing is preserved: the span's `startTime` is still set to when the test began.\n\n### Test span attributes\n\n| Attribute | Description |\n|---|---|\n| `test.case.name` | Test title |\n| `test.suite.name` | Describe block name |\n| `test.case.result.status` | `pass` or `fail` |\n| `code.filepath` | Source file |\n| `code.lineno` | Source line |\n| `test.id` | Playwright test ID |\n| `test.status` | `passed`, `failed`, `timedOut`, `skipped`, … |\n| `test.duration_ms` | Duration in milliseconds |\n| `test.retry` | Retry attempt number |\n| `test.project` | Playwright project name |\n| `browser.name` | `chromium`, `firefox`, `webkit` |\n| `browser.channel` | `chrome`, `msedge`, or empty |\n| `browser.headless` | `\"true\"` / `\"false\"` |\n| `browser.viewport` | e.g. `\"1280x720\"` |\n| `browser.locale` | e.g. `\"en-US\"` |\n\n### Propagating the trace ID to downstream services\n\nThe `useTraceparent` fixture from `@playwright-labs/fixture-otel` gives every test a single W3C\n[`traceparent`](https://www.w3.org/TR/trace-context/) that is shared by the reporter's test span\nand all spans emitted by the services the test calls.\n\nIt supports **two modes simultaneously** — automatic and manual — so you can mix them freely in\nthe same test.\n\n#### Automatic propagation (no manual headers)\n\nWhen `startWorkerSdk()` is called in the worker, the fixture activates the traceparent as the OTel\n`AsyncLocalStorage` context for the entire test.  Every library instrumented by OpenTelemetry\n(`node:http`, global `fetch`, gRPC, database clients, …) picks it up automatically — no manual\nheader injection needed.\n\n**Step 1 — add a worker-scoped fixture that calls `startWorkerSdk`:**\n\n```typescript\n// fixtures.ts\nimport { test as baseTest } from \"@playwright-labs/fixture-otel\";\nimport { startWorkerSdk } from \"@playwright-labs/fixture-otel\";\nimport { getNodeAutoInstrumentations } from \"@opentelemetry/auto-instrumentations-node\";\n\nexport const test = baseTest.extend<{}, { otelWorker: void }>({\n  otelWorker: [\n    async ({}, use) => {\n      startWorkerSdk({ instrumentations: [getNodeAutoInstrumentations()] });\n      await use();\n    },\n    { scope: \"worker\" },\n  ],\n});\n```\n\n`startWorkerSdk` is a singleton — safe to call multiple times. It reads the OTLP endpoint from\nthe env var set by the reporter (`PLAYWRIGHT_OTEL_BASE_URL`) and exits silently when the reporter\nis not running.\n\n**Step 2 — add `useTraceparent` to any test:**\n\n```typescript\nimport { test } from \"@playwright-labs/fixture-otel\";\n\n// No extra setup needed — all fetch/http calls are auto-instrumented.\ntest(\"checkout\", async ({ useTraceparent, page }) => {\n  useTraceparent(); // activates the OTel context; return value optional here\n  await page.goto(\"/checkout\");\n  await page.getByRole(\"button\", { name: \"Buy\" }).click();\n  // Every fetch and http.request made by the app shares the same traceId.\n});\n```\n\n#### Manual propagation\n\nFor clients that are not auto-instrumented (Playwright's `request` fixture, custom `fetch` wrappers,\nnon-Node runtimes), call `useTraceparent()` to get the header value and inject it yourself:\n\n```typescript\ntest(\"checkout API\", async ({ useTraceparent, request }) => {\n  const { traceparent, traceId } = useTraceparent();\n\n  await request.post(\"/api/order\", { headers: { traceparent } });\n  await request.get(\"/api/order/latest\", { headers: { traceparent } });\n\n  console.log(\"trace:\", traceId); // same ID visible in Jaeger for all spans\n});\n```\n\nBoth modes are fully composable — the same traceparent value is used whether you inject it\nmanually or it is propagated automatically.\n\n#### `Traceparent` object\n\n| Property | Type | Description |\n|---|---|---|\n| `traceId` | `string` | 32-char lowercase hex trace ID |\n| `spanId` | `string` | 16-char lowercase hex parent span ID |\n| `traceparent` | `string` | Full W3C header value: `00-{traceId}-{spanId}-01` |\n\n### Forwarding annotations as span attributes\n\nAdd `pw_otel.`-prefixed annotations inside a test to attach custom attributes to the test span:\n\n```typescript\ntest(\"checkout flow\", async ({ page }) => {\n  test.info().annotations.push(\n    { type: \"pw_otel.feature\", description: \"checkout\" },\n    { type: \"pw_otel.team\",    description: \"platform\" },\n  );\n  // span attributes: { feature: 'checkout', team: 'platform' }\n});\n```\n\nUse the `annotationLabel` helper to avoid typos:\n\n```typescript\nimport { annotationLabel } from \"@playwright-labs/reporter-otel\";\n\ntest.info().annotations.push({\n  type: annotationLabel(\"feature\"),\n  description: \"checkout\",\n});\n```\n\n## Custom Fixtures (`@playwright-labs/fixture-otel`)\n\nInstall the package and import from it:\n\n```bash\nnpm install @playwright-labs/fixture-otel\n```\n\n```typescript\nimport { test, expect } from \"@playwright-labs/fixture-otel\";\n```\n\n### Counter\n\n```typescript\ntest(\"track API calls\", async ({ useCounter, page }) => {\n  const requests = useCounter(\"api_requests\", { unit: \"requests\" });\n\n  await page.goto(\"/users\");\n  requests.add(1, { endpoint: \"/users\", status: \"200\" });\n\n  await page.goto(\"/orders\");\n  requests.add(1, { endpoint: \"/orders\", status: \"200\" });\n\n  expect(requests).toHaveOtelCallCount(2);\n  // automatically flushed to reporter after the test\n});\n```\n\n### Histogram\n\n```typescript\ntest(\"track page load latency\", async ({ useHistogram, page }) => {\n  const duration = useHistogram(\"page_load_ms\", { unit: \"ms\" });\n\n  const start = Date.now();\n  await page.goto(\"/dashboard\");\n  duration.record(Date.now() - start, { route: \"/dashboard\" });\n\n  expect(duration).toBeOtelMetricCollected();\n});\n```\n\n### UpDownCounter\n\n```typescript\ntest(\"track in-flight requests\", async ({ useUpDownCounter, page }) => {\n  const inFlight = useUpDownCounter(\"http_in_flight\");\n\n  page.on(\"request\",        () => inFlight.add(1));\n  page.on(\"requestfinished\",() => inFlight.add(-1));\n  page.on(\"requestfailed\",  () => inFlight.add(-1));\n\n  await page.goto(\"/dashboard\");\n  expect(inFlight).toHaveOtelMinCallCount(1);\n});\n```\n\n### useTraceparent — W3C trace propagation\n\nGenerates a W3C `traceparent` at the start of the test, activates it as the OTel context for the\ntest duration, and registers it as the `pw_otel.traceparent` annotation so the reporter's test span\njoins the same trace.\n\n**Automatic** — with `startWorkerSdk()` running in the worker, all instrumented code propagates\nit without any manual work:\n\n```typescript\ntest(\"checkout\", async ({ useTraceparent, page }) => {\n  useTraceparent(); // activates context — return value optional\n  await page.goto(\"/checkout\");\n  // fetch/http auto-instrumented spans share the same traceId automatically\n});\n```\n\n**Manual** — get the header value and inject it yourself:\n\n```typescript\ntest(\"order API\", async ({ useTraceparent, request }) => {\n  const { traceparent } = useTraceparent();\n  await request.post(\"/api/orders\", { headers: { traceparent } });\n});\n```\n\nCalling `useTraceparent()` multiple times in the same test returns the **same object** — the OTel context and annotation are set up once at fixture initialisation.\n\n### useSpan — custom child spans\n\n```typescript\ntest(\"track checkout\", async ({ useSpan, page }) => {\n  const span = useSpan(\"checkout.flow\");\n  await page.goto(\"/checkout\");\n  span.setAttribute(\"cart.items\", 3);\n  span.setAttribute(\"payment.method\", \"credit_card\");\n  span.end();\n\n  expect(span).toBeOtelSpanEnded();\n});\n```\n\nSpans support method chaining and error status:\n\n```typescript\ntest(\"simulate timeout\", async ({ useSpan }) => {\n  const span = useSpan(\"db.query\");\n  span.setStatus(\"error\", \"Connection timed out after 5000ms\");\n  span.end();\n});\n```\n\n### `using` keyword — scope-bound lifecycle\n\nBoth metrics and spans implement `Symbol.dispose`, so they work with the TypeScript 5.2+ `using` keyword:\n\n```typescript\ntest(\"scope-bound metric\", async ({ useCounter, useSpan, page }) => {\n  {\n    using span = useSpan(\"page.load\");\n    await page.goto(\"/dashboard\");\n    span.setAttribute(\"status\", \"loaded\");\n  } // span.end() called automatically\n\n  {\n    using requests = useCounter(\"api_calls\");\n    await page.click('[data-testid=\"load-more\"]');\n    requests.add(1);\n  } // requests.collect() called automatically\n});\n```\n\n### `withSpan` — callback-based span helper\n\n`withSpan` is a standalone function (no fixture required) that wraps a synchronous or async callback in an OTel span.  The span is created before the callback runs and ended automatically when it completes — whether it resolves or throws.\n\n```typescript\nimport { withSpan } from \"@playwright-labs/fixture-otel\";\n```\n\n#### Pairing with `test.step`\n\nUsing both together gives visibility in two places simultaneously — Playwright Trace Viewer (steps) and Jaeger / Tempo (spans):\n\n```typescript\ntest(\"checkout flow\", async ({ page }) => {\n  await test.step(\"add item to cart\", () =>\n    withSpan(\"cart.add\", (span) => {\n      span.setAttribute(\"product.id\", \"abc-123\");\n      return page.click('[data-testid=\"add-to-cart\"]');\n    }),\n  );\n\n  await test.step(\"complete checkout\", () =>\n    withSpan(\"checkout.submit\", async (span) => {\n      span.setAttribute(\"cart.items\", 3);\n      span.setAttribute(\"payment.method\", \"credit_card\");\n      await page.click('[data-testid=\"checkout\"]');\n      span.setStatus(\"ok\");\n    }),\n  );\n});\n```\n\n#### Standalone usage (without `test.step`)\n\n```typescript\nconst user = await withSpan(\"db.users.find\", async (span) => {\n  span.setAttribute(\"db.table\", \"users\");\n  return db.findById(userId);\n});\n```\n\n#### Error handling\n\nIf the callback throws or rejects, the span status is set to `\"error\"` with the error message, then the span is ended and the error re-thrown:\n\n```typescript\n// Span status = \"error\", message = \"HTTP 500 Internal Server Error\"\nawait withSpan(\"api.orders\", async (span) => {\n  const res = await fetch(\"/api/orders\");\n  if (!res.ok) throw new Error(`HTTP ${res.status} ${res.statusText}`);\n  return res.json();\n});\n```\n\n## Custom Expect Matchers\n\nAvailable when importing `expect` from `@playwright-labs/fixture-otel`:\n\n### `toBeOtelMetricCollected()`\n\nAsserts the metric was recorded at least once and `collect()` was called.\n\n```typescript\nconst counter = useCounter(\"http_requests\");\ncounter.add(1);\nexpect(counter).toBeOtelMetricCollected();\n```\n\n### `toHaveOtelCallCount(n)`\n\nAsserts the exact number of times a value was recorded.\n\n```typescript\ncounter.add(1);\ncounter.add(1);\ncounter.add(1);\nexpect(counter).toHaveOtelCallCount(3);\n```\n\n### `toHaveOtelMinCallCount(min)`\n\nAsserts the metric was recorded at least `min` times.\n\n```typescript\nexpect(counter).toHaveOtelMinCallCount(2);\n```\n\n### `toBeOtelSpanEnded()`\n\nAsserts that a `useSpan` span has been ended.\n\n```typescript\nconst span = useSpan(\"my.operation\");\nspan.end();\nexpect(span).toBeOtelSpanEnded();\n```\n\n## How Custom Metrics and Spans Work\n\nThe fixture system uses a **stdout event bridge** between Playwright workers and the reporter process:\n\n1. When `collect()` is called (manually, on fixture teardown, or when a `using` block exits), the metric class serializes its data points as a JSON line prefixed with `__pw_otel__` and writes it to `process.stdout`.\n2. When `span.end()` is called, the Span serializes itself the same way.\n3. The reporter's `onStdOut` hook intercepts these lines and records them with the shared OTel SDK — metrics via the `Meter`, spans as child spans of the current test span.\n\nThis design works seamlessly across Playwright's multi-worker architecture without additional network setup.\n\n## E2E Example (`examples/otel-stack/`)\n\nThe monorepo includes a fully wired example under `examples/otel-stack/` with a Docker Compose stack:\n\n| Service | Port | Purpose |\n|---|---|---|\n| `otel-collector` | `4318` OTLP/HTTP, `8889` Prometheus metrics | Receives all traces and metrics |\n| `jaeger` | `16686` UI, `4317` OTLP/gRPC | Stores and visualises traces |\n| `prometheus` | `9090` | Scrapes and stores metrics |\n| `grafana` | `3000` | Pre-configured dashboards |\n\n### Start the stack\n\n```bash\ncd examples/otel-stack\ndocker compose up -d --wait\n```\n\n### Run the example\n\n```bash\npnpm test:e2e\n```\n\nThis runs three Playwright projects:\n\n| Project | File | Purpose |\n|---|---|---|\n| `generate` | `tests/sample.spec.ts` | Emits OTel traces + custom metrics |\n| `verify` | `tests/verify.spec.ts` | Queries backends and asserts data arrived |\n| `demo` | `tests/edge-cases.spec.ts` | Intentional failures, timeouts, and retries — produces realistic fail/retry metrics in Grafana |\n\n### Open the UIs\n\n| URL | Service |\n|---|---|\n| http://localhost:3000 | Grafana (dashboards: *Playwright OTel — Base*, *Per User*) |\n| http://localhost:16686 | Jaeger — select service `playwright` |\n| http://localhost:9090 | Prometheus |\n| http://localhost:8889/metrics | Raw OTel Collector scrape endpoint |\n\n### Tear down\n\n```bash\ndocker compose down --remove-orphans\n```\n\n## Useful PromQL Queries\n\n```promql\n# Tests by result\nsum by (test_result) (pw_tests_total)\n\n# Pass rate\n100 * sum(pw_tests_total{test_result=\"pass\"}) / sum(pw_tests_total)\n\n# 95th percentile test duration\nhistogram_quantile(0.95, sum by (le) (rate(pw_test_duration_milliseconds_bucket[5m])))\n\n# Average test duration in ms\nsum(pw_test_duration_milliseconds_sum) / sum(pw_test_duration_milliseconds_count)\n\n# Retries\nsum(pw_test_retries_total)\n\n# Tests by browser\nsum by (browser_name) (pw_tests_total)\n\n# Tests by project\nsum by (test_project) (pw_tests_total)\n\n# Heap memory in MB\npw_process_memory_heap_used_bytes / 1024 / 1024\n```\n\n## TypeScript\n\nAll types are fully exported:\n\n```typescript\nimport type {\n  OtelReporterOptions,\n} from \"@playwright-labs/reporter-otel\";\n\n// parseTraceparent is exported for consumers who need to inspect a traceparent\n// string outside of the reporter lifecycle:\nimport { parseTraceparent, TRACEPARENT_ANNOTATION } from \"@playwright-labs/reporter-otel\";\n\n// From the fixture package:\nimport type {\n  OtelFixture,\n  Traceparent,\n  WorkerSdkOptions,\n  Counter,\n  Histogram,\n  UpDownCounter,\n  Span,\n  OtelMatchers,\n} from \"@playwright-labs/fixture-otel\";\n\n// Value exports:\nimport { withSpan, startWorkerSdk, TRACEPARENT_ANNOTATION } from \"@playwright-labs/fixture-otel\";\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}