Migrate analytics to brew.sh proxy - #23639
Conversation
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Thanks! Can you confirm you've run this locally with export HOMEBREW_ANALYTICS_DEBUG=1 and it produces identical output (bar the URL) to the previous approach?
There was a problem hiding this comment.
Pull request overview
This PR migrates Homebrew’s analytics reporting endpoint to the analytics.brew.sh proxy and removes the previously hard-coded InfluxDB token from the client-side implementation.
Changes:
- Switch
Utils::Analytics::INFLUX_HOSTtohttps://analytics.brew.sh. - Remove the
Authorization: Token ...header from analytics write requests. - Update
formula-analyticsspec expectations for the new host value.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Library/Homebrew/utils/analytics.rb |
Updates the Influx host to the brew.sh proxy and removes the Authorization token header from write requests. |
Library/Homebrew/test/dev-cmd/formula-analytics_spec.rb |
Adjusts expected query request host to match the new INFLUX_HOST value. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
I've checked both the normal write flow and |
|
Thanks! |
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?This migrates the analytics reporting to our own proxy so we have more control over it. Also makes it easier to find out for people what the traffic is. Since our proxy automatically sets a write-only token we will not need to set one anymore here.