Skip to content

Honour the DO_NOT_TRACK env var - #17931

Merged
shs96c merged 1 commit into
SeleniumHQ:trunkfrom
shs96c:do-not-track
Aug 20, 2026
Merged

Honour the DO_NOT_TRACK env var#17931
shs96c merged 1 commit into
SeleniumHQ:trunkfrom
shs96c:do-not-track

Conversation

@shs96c

@shs96c shs96c commented Aug 20, 2026

Copy link
Copy Markdown
Member

Rather than having multiple different mechanisms per app for handling opting out of tracking, there's a move to standardise on this env var (https://donottrack.sh/) Selenium should honour that.

Rather than having multiple different mechanisms per app for handling
opting out of tracking, there's a move to standardise on this env
var (https://donottrack.sh/) Selenium should honour that.
@selenium-ci selenium-ci added C-rust Rust code is mostly Selenium Manager B-manager Selenium Manager labels Aug 20, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Honor DO_NOT_TRACK for Selenium Manager telemetry

✨ Enhancement 🧪 Tests 🕐 Less than 10 minutes

Grey Divider

AI Description

• Honor DO_NOT_TRACK=1 by disabling Selenium Manager usage statistics.
• Preserve existing opt-out behavior and test accepted and ignored environment values.
Diagram

graph TD
  DNT["DO_NOT_TRACK"] --> Resolve["Opt-out resolver"] --> Config["Manager config"] --> Gate{"Stats allowed?"} -->|Yes| Stats["Plausible stats"]
  Existing["Existing opt-out"] --> Resolve
  Gate -->|No| Skip["Skip telemetry"]
Loading
High-Level Assessment

The centralized configuration approach is appropriate: it combines DO_NOT_TRACK with the existing opt-out without weakening either mechanism, and the pure helper makes the precedence rule easy to test. Reading the variable directly in the telemetry sender was considered but would scatter tracking policy outside configuration initialization.

Files changed (1) +31 / -1

Enhancement (1) +31 / -1
config.rsRespect DO_NOT_TRACK when resolving telemetry configuration +31/-1

Respect DO_NOT_TRACK when resolving telemetry configuration

• Adds 'DO_NOT_TRACK=1' as an additional condition for setting 'ManagerConfig::avoid_stats', while preserving the existing configuration and feature-based opt-out. Adds focused unit tests for the supported value, the existing opt-out, and ignored values.

rust/src/config.rs

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@shs96c
shs96c merged commit d084fb0 into SeleniumHQ:trunk Aug 20, 2026
58 checks passed
@cgoldberg

Copy link
Copy Markdown
Member

nice.. I already have that set in my shell config :)

This was referenced Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-manager Selenium Manager C-rust Rust code is mostly Selenium Manager

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants