Skip to content

Add Tagged Activity template for trace-tag attribution - #3

Closed
kmccarp wants to merge 1 commit into
mainfrom
add-trace-tag-template
Closed

Add Tagged Activity template for trace-tag attribution#3
kmccarp wants to merge 1 commit into
mainfrom
add-trace-tag-template

Conversation

@kmccarp

@kmccarp kmccarp commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Background / problem

Every command that emits a trace accepts a repeatable --trace-tag key=value option, which appends a tag.<key> column to the trace.csv so telemetry can be attributed to a dimension the trace does not otherwise capture — a change set, a team, a region, a ticket. None of the existing templates use these columns, and the data dictionary does not document them, so the capability is effectively invisible to anyone building reports from the trace data.

Solution

Adds a Tagged Activity template that groups committed output by a trace tag and reports successful commits, repos changed, distinct recipes, and estimated hours saved per tag value. The example groups by tag.changeSetId — the canonical tag for correlating a change set's runs and commits — but any tag.<key> column works. Like the other commit-based templates, the query collapses to one row per commitId before aggregating so push re-emission does not inflate the totals.

The change also documents the --trace-tag feature and the tag.<key> columns in the data dictionary, including the dot-quoting caveat for SQL identifiers, and links the new template from the top-level README. The template ships with the usual SQL, README, notebook, sample data, and rendered chart.

Test plan

  • Run tagged-activity.ipynb against the bundled sample data and confirm the chart renders.
  • Run tagged-activity.sql against a trace table containing tagged runs and confirm the per-tag attribution.

Adds a template that groups committed output by a trace tag (example:
tag.changeSetId), reporting commits, repos changed, distinct recipes, and hours
saved per tag value, with a per-commitId dedup so push re-emission does not
inflate totals. Documents the --trace-tag feature and the tag.<key> columns in
the data dictionary and links the template from the top-level README.
@bryanfriedman

Copy link
Copy Markdown
Contributor

Moved to docs and tag.<key> is included there.

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