You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have no signal on whether a published dashboard copy is actually used —
how often it's opened, by how many people, or what it costs its owner. The
only cost evidence today is point-in-time bytes-billed measurements (#401, #377 section H). This issue adds user-side usage tracking for the
dashboard's read path, modeled on how the BQAA write path already solves
attribution.
The pattern to reuse: the plugin's Write API trace_id
req=bq_storage_types.AppendRowsRequest(
write_stream=self.write_stream,
trace_id=f"{trace_id_prefix}/{__version__}", # e.g. google-adk-bq-logger/1.x
)
Every write is attributable to the producer and its version, without any
side channel. The dashboard's read path has no equivalent marker: its
jobs run with the viewer's credentials in the viewer's billing project, and
nothing distinguishes them from any other query against the same table.
Proposed mechanism (read-path analog)
Version-stamped marker in the template query. Add a stable,
distinctive marker to sql/events_v1.template.sql — e.g. a leading
comment /* bqaa-dashboard/<events-schema-version> */ — so every job
the dashboard issues carries it in the job's query text. Verify first that Looker Studio preserves SQL comments in the
jobs it issues (check INFORMATION_SCHEMA.JOBS.query against a live
copy); if comments are stripped, fall back to a no-op literal the
optimizer keeps (to be prototyped). The marker must not touch the
sentinel bindings (sqlReplace list unchanged) and gets pinned by
the existing generated-artifact drift tests.
Corroborating signal, no template change needed: Looker Studio
stamps its jobs with the requestor: looker_studio job label —
usable today, but it cannot distinguish this dashboard from any
other Looker Studio report on the same table, which is why the
marker is the primary key and the label the cross-check. Verify the
label's presence/name against a live copy rather than assuming it.
A documented usage query (docs + an oracle-style SQL file) over region-<X>.INFORMATION_SCHEMA.JOBS_BY_PROJECT, filtered on the
marker (and/or label + referenced table): queries/day, distinct
principals (user_email), total/percentile total_bytes_billed,
error rate, cache-hit rate. This is the read-path counterpart of the [Dashboard] Date range: default to 90 days and make one control apply to every page #401 bytes-billed measurement, repeatable by any installation owner.
No new collection. The mechanism only makes already-existing job
metadata attributable; it adds no fields about viewers beyond what
BigQuery job history already records in the owner's project.
Repo-side adoption metrics (how many installations exist) are explicitly
out of scope for this issue; if ever wanted, that is a separate
opt-in discussion.
Coordination
Changing the template's custom query requires an editor session and a
republish. #401 is currently the batch's only planned republish — decide
whether this marker rides the same session (one republish event, per the #404 plan's sequencing preference) or waits for the next scheduled one.
Either way the full #404 publication gate applies (all nine live_template_verification methods, the 3×3 protocol, propagation probe,
attestation re-dating last).
Acceptance criteria
An installation owner can answer, with one documented query in their
own project: how often their copy was queried, by how many distinct
principals, at what bytes billed, over the last N days.
The marker survives sqlReplace hydration unchanged and is pinned
by the generated-SQL drift tests.
Comment-survival (or fallback-literal) behavior is verified against
a live copy and recorded here before the template changes.
No data leaves the user's project; the configurator remains
backend-free; the docs state both explicitly.
Part of #404.
Request
We have no signal on whether a published dashboard copy is actually used —
how often it's opened, by how many people, or what it costs its owner. The
only cost evidence today is point-in-time bytes-billed measurements (#401,
#377 section H). This issue adds user-side usage tracking for the
dashboard's read path, modeled on how the BQAA write path already solves
attribution.
The pattern to reuse: the plugin's Write API
trace_idThe ADK BQAA plugin stamps every Storage Write API append with a
client-identity trace ID
(
bigquery_agent_analytics_plugin.py:2592-2601at74e7167,class at L4134):
Every write is attributable to the producer and its version, without any
side channel. The dashboard's read path has no equivalent marker: its
jobs run with the viewer's credentials in the viewer's billing project, and
nothing distinguishes them from any other query against the same table.
Proposed mechanism (read-path analog)
distinctive marker to
sql/events_v1.template.sql— e.g. a leadingcomment
/* bqaa-dashboard/<events-schema-version> */— so every jobthe dashboard issues carries it in the job's query text.
Verify first that Looker Studio preserves SQL comments in the
jobs it issues (check
INFORMATION_SCHEMA.JOBS.queryagainst a livecopy); if comments are stripped, fall back to a no-op literal the
optimizer keeps (to be prototyped). The marker must not touch the
sentinel bindings (
sqlReplacelist unchanged) and gets pinned bythe existing generated-artifact drift tests.
stamps its jobs with the
requestor: looker_studiojob label —usable today, but it cannot distinguish this dashboard from any
other Looker Studio report on the same table, which is why the
marker is the primary key and the label the cross-check. Verify the
label's presence/name against a live copy rather than assuming it.
region-<X>.INFORMATION_SCHEMA.JOBS_BY_PROJECT, filtered on themarker (and/or label + referenced table): queries/day, distinct
principals (
user_email), total/percentiletotal_bytes_billed,error rate, cache-hit rate. This is the read-path counterpart of the
[Dashboard] Date range: default to 90 days and make one control apply to every page #401 bytes-billed measurement, repeatable by any installation owner.
dashboard README, linking Looker Studio dashboard: UX/design/analytics improvement backlog #377 section H's operating guidance.
Privacy boundary — explicit non-goals
project; nothing reports to Google or this repository. The configurator
page keeps its no-backend property ([Dashboard/configurator] "Create my dashboard" flashes a "page not found" error before the Looker Studio report loads #398/[Dashboard/configurator] Pre-empt the Looker Studio authorization prompt — users cannot tell the page is legitimate #399/[Dashboard/configurator] Align the configurator page with Google Cloud brand style #400) untouched.
metadata attributable; it adds no fields about viewers beyond what
BigQuery job history already records in the owner's project.
out of scope for this issue; if ever wanted, that is a separate
opt-in discussion.
Coordination
Changing the template's custom query requires an editor session and a
republish. #401 is currently the batch's only planned republish — decide
whether this marker rides the same session (one republish event, per the
#404 plan's sequencing preference) or waits for the next scheduled one.
Either way the full #404 publication gate applies (all nine
live_template_verificationmethods, the 3×3 protocol, propagation probe,attestation re-dating last).
Acceptance criteria
own project: how often their copy was queried, by how many distinct
principals, at what bytes billed, over the last N days.
sqlReplacehydration unchanged and is pinnedby the generated-SQL drift tests.
a live copy and recorded here before the template changes.
backend-free; the docs state both explicitly.
publication gate.
Related
execution ledger).
generalizes.
bigquery_agent_analytics_plugin.py— the write-pathprecedent (pinned links above).