Skip to content

telemetry follow ups - #9791

Merged
pjain1 merged 1 commit into
mainfrom
telemetry_followup
Aug 6, 2026
Merged

telemetry follow ups#9791
pjain1 merged 1 commit into
mainfrom
telemetry_followup

Conversation

@pjain1

@pjain1 pjain1 commented Aug 5, 2026

Copy link
Copy Markdown
Member

Addressing feedback


  - [P1] Redact access tokens from telemetry page URLs — /Users/paragjain/work/rill-developer/web-common/src/metrics/service/MetricsEventFactory.ts:22-22
    When an authenticated user opens a public URL, dashboard links contain the bearer token in /-/share/[token] and report/alert links can contain it in ?token=...; copying the full window.location.href into every event sends that reusable credential to the telemetry pipeline.
    Construct a sanitized URL that removes or replaces these token values before assigning page_url.

  - [P2] Classify reports and alerts before generic project pages — /Users/paragjain/work/rill-developer/web-admin/src/routes/[organization]/[project]/+layout.svelte:282-282
    On /.../-/reports/[report] and /.../-/alerts/[alert], this new call yields Project because getScreenNameFromPage checks isProjectPage first, and that predicate accepts these /-/ routes. Page-view telemetry therefore never uses the existing Report or Alert screen values for
    these pages; reorder the specific checks or narrow the generic project match.

  - [P2] Cancel the page-view timer when leaving the project layout — /Users/paragjain/work/rill-developer/web-admin/src/routes/[organization]/[project]/+layout.svelte:284-284
    When a client-side navigation leaves the project layout within 250 ms, the component is destroyed without cancelling this timer, so its retained callback still emits the page that the user only passed through. Because page_url is read when the callback eventually fires, the
    event can also combine the old captured screen/resource with the destination URL; cancel the throttler during layout teardown.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@pjain1
pjain1 requested a review from AdityaHegde August 5, 2026 12:14
event.status = status;
event.message = message;
event.page_url = pageUrl;
event.page_url = sanitizePageUrl(pageUrl);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe we should not emit page url at all until we have better events for dimensions and measures. Exposing other things like filter values can also be an issue no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't see those as an issue. Its just token is sensitive and if leaked can cause issues.

@pjain1
pjain1 merged commit 5700480 into main Aug 6, 2026
23 of 24 checks passed
@pjain1
pjain1 deleted the telemetry_followup branch August 6, 2026 05:33
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