Repository navigation
Conversation
…acts manifest The manifest listed each test's state but not when it ran or why it failed, so a reporter had to open the trace zip to build a per-test record. The WDIO service now stamps start and end time, the framework duration and the final attempt's failure message onto the metadata it already keeps; core copies them into the manifest. The manifest types move to shared so the contract has one definition for producers and readers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test history was only visible inside the devtools dashboard, one run at a time. OpenTelemetry is the open standard every log and trace backend already accepts, so pushing each run's tests there makes the history searchable and aggregatable with the tools a team already runs. devtools-otel reads an artifacts manifest and its trace zips and sends one log record per test, plus a trace per test with its actions as child spans where a zip was retained. Retain-on-failure policies are refused with a warning because their manifests omit the telemetry for passing tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The otel package needs a collector, a log and trace store, a dashboard and an S3-compatible bucket to be useful end to end. This example wires them in one compose file, provisions a test-results dashboard whose Replay column opens each retained trace in a player, and documents the access model: the bucket is network-private because a trace zip holds everything the run typed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and end WebdriverIO's afterScenario result does not carry the scenario's duration in milliseconds, so the manifest recorded values like 0.98 ms for a 10-second scenario. Mocha and Jasmine keep the framework's duration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Teams pushing to Grafana Cloud, Honeycomb or New Relic need the token and endpoint variables, and an org with several suites needs a way to tell them apart. Both already work through the standard OTEL_* variables and resource attributes, so the README says how instead of adding options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Winify
force-pushed
the
feat/otel-export
branch
from
November 4, 2026 08:19
245adb4 to
0834d7c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Test history lives inside the devtools dashboard, one run at a time. This PR pushes each run's results to any OTLP backend, so the history becomes searchable and aggregatable with tools a team already runs. OTLP is the open standard that log and trace stores already accept, so no vendor lock-in is added. It also lays groundwork for comparing failing and passing attempts of the same test across runs.
What
Four commits, in order:
refactor(trace): move the trace zip reader next to the writer— the zip reader (trace-reader*.tsand its tests) moves frompackages/backendtopackages/trace, so any consumer can parse a trace zip without running the server. Backend keepsreadTraceZipas the thin disk-read wrapper.feat(service): record each test's timing and final error in the artifacts manifest— the WDIO service stampsstartTime,endTime,durationMsand the final attempt'serroronto each test's metadata, and core copies them intodevtools-artifacts-<sessionId>.json. The manifest contract moves topackages/shared, so producers and readers share one definition.feat(otel): push devtools test results and traces to OpenTelemetry— new package@wdio/devtools-otelwith thedevtools-otelCLI. It reads a manifest and its trace zips, then sends one log record per test and, where a zip was retained, one trace per test with the test as the root span and its actions as child spans.docs(examples): add a Grafana LGTM stack with one-click trace replay—examples/o11yis a compose stack (OTel collector, Loki, Tempo, Grafana, and an S3-compatible bucket) with a provisioned test-results dashboard. Each row's Replay link opens the retained trace in a player. The player host is a dashboard variable,player_base, that defaults tohttps://player.vibium.dev.Data model: a test's record in Loki is its history entry (one record per test, about 0.5 KB). Its trace in Tempo has one span per action (about 3 KB per trace). The zip itself goes to the user's own bucket, and the record links to it.
Scope
core?" question does not apply to the otel package itself, which is a new standalone package.NOT SUPPORTED
retain-on-failureandretain-on-first-failuretrace policies. Those policies drop the zips of passing tests, so the CLI skips a manifest that has anyretained: falseartifact and warns. Record withtracePolicy: 'on'.Known limits
specFileRetriesis not counted as flaky. Each retry spawns a fresh worker, so the retry is outside the attempt ledger.Measurements
From a 150-test mocha run and a 150-test cucumber run, filmstrip off:
Verification
Checks run in this branch's worktree (
feat/otel-export, based onupstream/main1375b2f):pnpm build: exit 0.pnpm test: 232 test files passed, 3085 tests passed, 3 skipped, 0 failed.pnpm lint: 0 errors. Warnings exist in packages other than this PR's. Eslint on the touched TypeScript files: 0 errors, 2 warnings. Both warnings are inpackages/service/src/index.ts(asyncbeforeat 64 lines, file at 635 lines). Upstream's version of that file produces the same two warnings at 633 lines, so this PR adds two lines to an already over-cap file.tsc --noEmit -p packages/otel/tsconfig.json: exit 0.from/require(check fromCLAUDE.md) onpackages/otel/dist,packages/backend/distandpackages/service/dist: no matches.pnpm-lock.yamlwas regenerated with pnpm 10.34.9 (CI pins 10.26.1, which drops thelibcplatform fields on native packages in this lockfile; 10.34.9 keeps them). The diff is 197 insertions and 5 deletions, and adds thepackages/otelimporter.End to end, on the same changes before they were rebased onto this base (not re-run here): a real WDIO mocha run (3 tests, one failing by design) and a 150 mocha + 150 cucumber benchmark were pushed through the CLI into the
examples/o11ystack. Loki held one record per test with the manifest timing, Tempo held one trace per test with its action spans, and the Replay link played the zip in a real browser on player.vibium.dev. A fail-then-pass retry was checked to report the retried attempt's data.Not in this PR
traceparentcorrelation.🤖 Generated with Claude Code