Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transmit url analytics correctly for rerun.io domains #6322

Merged
merged 2 commits into from
May 14, 2024

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented May 14, 2024

What

Resolves:

I added the processing at the last stage of the analytics output so we don't depend on every code path possibily populating the analytics event to do its own domain evaluation and/or hashing.

Validated events look correct in posthog:
image

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

@jleibs jleibs added 📊 analytics telemetry analytics 🕸️ web regarding running the viewer in a browser include in changelog labels May 14, 2024
@jleibs jleibs marked this pull request as ready for review May 14, 2024 15:23
@jleibs jleibs requested a review from jprochazk May 14, 2024 15:51

/// Given a URL, extract the root domain.
fn extract_root_domain(url: &str) -> Option<String> {
let parsed = Url::parse(url).ok()?;
Copy link
Member

Choose a reason for hiding this comment

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

Side note: I really dislike how there's no borrowed version of Url

Copy link
Member Author

Choose a reason for hiding this comment

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

Ha. Yeah, I was trying for a bit to implement the root-domain extraction as a slice before I realized Url wasn't borrowed.

@jleibs jleibs merged commit 178ef60 into main May 14, 2024
34 checks passed
@jleibs jleibs deleted the jleibs/fix_url_analytics branch May 14, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📊 analytics telemetry analytics include in changelog 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants