autotel-playwright 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -203,6 +203,18 @@ When `API_BASE_URL` or `AUTOTEL_PLAYWRIGHT_API_ORIGIN` includes a path (e.g. `ht
|
|
|
203
203
|
|
|
204
204
|
Playwright expects `globalSetup` to be a **path string** (e.g. `'./globalSetup.ts'`), not a function. Use a file that exports a default function which calls `init()`.
|
|
205
205
|
|
|
206
|
+
### PostHog events never arrive from a test
|
|
207
|
+
|
|
208
|
+
`posthog-js` drops every event from an automated browser: Playwright sets `navigator.webdriver`, and PostHog's bot filter reads it. A spec that asserts on `$pageview` or a `capture()` reaching PostHog sees nothing, while the trace side of an `autotel-posthog` join works as usual. Switch the filter off for the test, either in the app under a test flag or from the spec:
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
await page.evaluate(() => {
|
|
212
|
+
window.posthog?.set_config({ opt_out_useragent_filter: true });
|
|
213
|
+
});
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
`autotel-web` spans are unaffected: they are exported by autotel, not by PostHog.
|
|
217
|
+
|
|
206
218
|
### Fixture spans vs reporter spans
|
|
207
219
|
|
|
208
220
|
- **Fixture** (worker): test span and `step()` spans run in the worker; requests to your API get trace context, so one trace = test → API. Call `init()` in a globalSetup **or** at the top of your spec so the worker process exports these spans.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autotel-playwright",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"description": "Playwright fixture for OpenTelemetry: one span per test and trace context injected into API requests",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"NOTICE"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"autotel": "7.
|
|
34
|
+
"autotel": "7.8.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@playwright/test": ">=1.62.0"
|