Closed Bug 1711928 Opened 4 years ago Closed 3 years ago

Stop overwriting User-Agent header in favor of X-Telemetry-Agent hearder

Categories

(Data Platform and Tools :: Glean: SDK, task, P1)

task

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: brizental, Assigned: perry.mcmanis)

References

Details

(Whiteboard: [good first bug][lang=Rust])

Attachments

(1 file)

No description provided.
See Also: → 1699080
Whiteboard: [telemetry:glean-rs:m?]
See Also: → 1722455
Whiteboard: [goo
Whiteboard: [goo → [good first bug][lang=Rust]
Flags: needinfo?(jrediger)

To help Mozilla out with this bug, here's the steps:

  1. Comment here on the bug that you want to volunteer to help. I (or someone else) will assign it to you.
  2. Clone the Glean SDK repository: git clone https://github.com/mozilla/glean
  3. Build the Rust part of the code: cargo build -- This should succeed.
  4. 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 to X-Telemetry-Agent too
    • Edit the documentation to call out the new X-Telemetry-Agent and add a (deprecated) to the User-Agent doc
  5. Build your change with make build-rust and test your change with make test-rust. Also check your changes for adherence to our style guidelines by using make rustfmt and make clippy. If you also had to change Kotlin, Swift or Python tests run them as well (make test-kotlin, make test-swift, ...)
  6. 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.
  7. ...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.

Flags: needinfo?(jrediger)
Blocks: 1699080
Assignee: nobody → pmcmanis
Status: NEW → ASSIGNED
Priority: P3 → P1

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.

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

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: