Stop overwriting User-Agent header in favor of X-Telemetry-Agent hearder
Categories
(Data Platform and Tools :: Glean: SDK, task, P1)
Tracking
(Not tracked)
People
(Reporter: brizental, Assigned: perry.mcmanis)
References
Details
(Whiteboard: [good first bug][lang=Rust])
Attachments
(1 file)
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
To help Mozilla out with this bug, here's the steps:
- Comment here on the bug that you want to volunteer to help. I (or someone else) will assign it to you.
- Clone the Glean SDK repository:
git clone https://github.com/mozilla/glean
- Build the Rust part of the code:
cargo build
-- This should succeed. - Start working on this bug.
- In
glean-core/src/upload/request.rs
find the line where we set the"User-Agent"
, change that to"X-Telemetry-Agent"
- See if any tests check for the
User-Agent
value and change that toX-Telemetry-Agent
too - Edit the documentation to call out the new
X-Telemetry-Agent
and add a(deprecated)
to theUser-Agent
doc
- In
- Build your change with
make build-rust
and test your change withmake test-rust
. Also check your changes for adherence to our style guidelines by usingmake rustfmt
andmake clippy
. If you also had to change Kotlin, Swift or Python tests run them as well (make test-kotlin
,make test-swift
, ...) - Submit the patch for review as a pull request on GitHub. 1. After a series of reviews and changes to your patch, I'll merge it.
- Don't forget to add a changelog entry in
CHANGELOG.md
.
- Don't forget to add a changelog entry in
- ...now you get to think about what kind of bug you'd like to work on next. Let me know what you're interested in and I can help you find your next contribution.
If anything is unclear needinfo me here in the Bugzilla bug or create a Pull Request and ask me (@badboy) there for help.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
•
|
||
hey :janerik a hopefully QQ on this one; from reading the proposal and your outline of what to do I understand that this change will capture the same data as the prior User-Agent key, but without changing the create_user_agent_header_value
signature it and its subsequent functions it seem potentially confusing to me, is it acceptable for me to update the documentation in the index.md to clarify that this is what's happening? that seems like a smaller/more appropriate change than refactoring. Im happy to leave as is if it's out-of-scope too much, or refactor, really whatever works best.
Comment 3•3 years ago
|
||
What about create_user_agent_header_value
is confusing? I'm not opposed to a new name if it communicates the right thing, but I do think right now it's ok.
Which documentation do you intend to update?
The current docs changed since I wrote the above. It's probably enough to adjust it now to call out that only Glean.js on websites/web extensions send a User-Agent
Comment 4•3 years ago
|
||
Comment 5•3 years ago
|
||
badboy merged PR #1983: "Bug 1711928 - Stop overwriting User-Agent header in favor of X-Telemetry-Agent header" in fd02d2d.
Description
•