Skip to content

Spec: Extension telemetry#6110

Open
inancgumus wants to merge 1 commit into
masterfrom
add/ext-telemetry-spec
Open

Spec: Extension telemetry#6110
inancgumus wants to merge 1 commit into
masterfrom
add/ext-telemetry-spec

Conversation

@inancgumus

@inancgumus inancgumus commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

What?

Proposes how k6 should report which catalog extensions a test uses.

  • Reports importable (k6/x/*) and subcommand (k6 x <name>) extensions.
  • Filters to the catalog by reusing k6's cached catalog (k6 x already has it) to avoid reporting private extensions.
  • Reports the same way whether the binary was built with xk6 or produced by binary provisioning.
  • Reuses the existing usage-report opt-out, with no new endpoint and no backend change.

Why?

We have no idea which extensions users run. Now that there are binary provisioning and an extension catalog, we want to gather data to decide which extensions to promote, maintain, or retire.

Note

Spec and design only; the implementation lands in a separate PR. Every test name, function, and file reference in these docs is what that PR will create, not existing code (file:line anchors point at today's code).

Where to review what:

  • proposal.md: scope and impact.
  • spec.md: the behavior, as GIVEN/WHEN/THEN acceptance criteria. Most review value is here.
  • design.md: the decisions and trade-offs. Disagreements go here.
  • tasks.md: the implementer's step-by-step plan. Skim it unless you care about the build order.

The described tests point the report endpoint at a local test server, so no test data ever reaches BQ.

Related PR(s)/Issue(s)

@inancgumus inancgumus self-assigned this Jun 27, 2026
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 27, 2026 15:28 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 27, 2026 15:30 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch 2 times, most recently from 979539a to e052efc Compare June 27, 2026 16:31
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 27, 2026 16:37 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 27, 2026 16:39 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch 3 times, most recently from cd81150 to 59d030b Compare June 27, 2026 16:52
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 27, 2026 16:57 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch 3 times, most recently from cba3392 to ab37c52 Compare June 27, 2026 17:02
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 27, 2026 17:08 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 27, 2026 17:10 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch from ab37c52 to 3d8110a Compare June 27, 2026 17:17
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 27, 2026 17:23 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 27, 2026 17:26 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch from 3d8110a to 6d0e503 Compare June 28, 2026 05:22
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 28, 2026 05:28 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 28, 2026 05:30 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch from 6d0e503 to 975f60c Compare June 28, 2026 05:33
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 28, 2026 05:39 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 28, 2026 05:41 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch from 975f60c to 9dfd5a2 Compare June 28, 2026 08:19
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 28, 2026 08:23 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 28, 2026 08:26 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch from 9dfd5a2 to ad4d53e Compare June 28, 2026 11:08
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 28, 2026 11:14 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing June 28, 2026 11:16 — with GitHub Actions Inactive
@inancgumus inancgumus marked this pull request as ready for review June 29, 2026 20:19
@inancgumus inancgumus requested a review from a team as a code owner June 29, 2026 20:19
@inancgumus inancgumus requested review from ankur22 and mstoykov and removed request for a team, ankur22 and mstoykov June 29, 2026 20:20
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch from ad4d53e to b2385b1 Compare July 1, 2026 15:36
@inancgumus inancgumus temporarily deployed to azure-trusted-signing July 1, 2026 15:42 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing July 1, 2026 15:44 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch from b2385b1 to 722025b Compare July 1, 2026 16:04
@inancgumus inancgumus temporarily deployed to azure-trusted-signing July 1, 2026 16:09 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing July 1, 2026 16:12 — with GitHub Actions Inactive
@@ -0,0 +1,140 @@
## How to work these tasks

The whole capability is verified by two table-driven integration tests on the real command harness (`internal/cmd/tests`, `NewGlobalTestState`), one per surface: `TestRunReportsExtensions` for `k6 run` and `TestSubcommandReportsUsage` for `k6 x`. Nothing is mocked; extensions register through the normal paths and both the catalog and the report endpoint are local HTTP servers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole capability is verified by two table-driven integration tests on the real command harness (internal/cmd/tests, NewGlobalTestState), one per surface: TestRunReportsExtensions for k6 run and TestSubcommandReportsUsage for k6 x.

Is this text explaining what the AI will need to implement later? It confused me to see such concrete and detailed technical references that aren't really there yet.

Nothing is mocked; extensions register through the normal paths and both the catalog and the report endpoint are local HTTP servers.

Does this mean that we'll have artificial data mixed with real data in BQ?

@inancgumus inancgumus Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The task list is for the implementer, so everything it names is what the implementation will have. Fair point, though, it makes it read like the tests are already there. I'll reword it. BQ: Every test points to a local test server, so reports never leave the test process. Hopefully made that clearer now 🙇

@inancgumus inancgumus changed the title Propose extension usage telemetry Spec: Extension telemetry Jul 3, 2026
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch from 722025b to 47cb6c9 Compare July 3, 2026 17:48
@inancgumus inancgumus temporarily deployed to azure-trusted-signing July 3, 2026 17:54 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing July 3, 2026 17:55 — with GitHub Actions Inactive
@inancgumus inancgumus mentioned this pull request Jul 3, 2026
4 tasks
@inancgumus inancgumus force-pushed the add/ext-telemetry-spec branch from 47cb6c9 to 0a303f6 Compare July 3, 2026 23:39
@inancgumus inancgumus temporarily deployed to azure-trusted-signing July 3, 2026 23:46 — with GitHub Actions Inactive
@inancgumus inancgumus deployed to azure-trusted-signing July 3, 2026 23:48 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants