Skip to content

Commit 218083f

Browse files
author
Beatriz Rizental
authored
Merge pull request #330 from brizental/1699080-telemetry-agent
Bug 1699080 - Change User-Agent header to X-Telemetry-Agent header
2 parents caa10fe + e0133ce commit 218083f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.13.0...main)
44

5+
* [#313](https://github.com/mozilla/glean.js/pull/313): Send Glean.js version and platform information on X-Telemetry-Agent header instead of User-Agent header.
56
# v0.13.0 (2021-05-18)
67

78
[Full changelog](https://github.com/mozilla/glean.js/compare/v0.12.0...v0.13.0)

glean/src/core/upload/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class PingUploader implements PingsDatabaseObserver {
133133
"Date": (new Date()).toISOString(),
134134
"X-Client-Type": "Glean.js",
135135
"X-Client-Version": GLEAN_VERSION,
136-
"User-Agent": `Glean/${GLEAN_VERSION} (JS on ${await this.platformInfo.os()})`
136+
"X-Telemetry-Agent": `Glean/${GLEAN_VERSION} (JS on ${await this.platformInfo.os()})`
137137
};
138138

139139
return {

glean/tests/core/upload/index.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ describe("PingUploader", function() {
214214
assert.strictEqual(appId, Context.applicationId);
215215

216216
assert.ok("Date" in headers);
217-
assert.ok("User-Agent" in headers);
217+
assert.ok("Content-Length" in headers);
218218
assert.ok("Content-Type" in headers);
219219
assert.ok("X-Client-Type" in headers);
220220
assert.ok("X-Client-Version" in headers);
221-
assert.ok("Content-Length" in headers);
221+
assert.ok("X-Telemetry-Agent" in headers);
222222
});
223223
});

0 commit comments

Comments
 (0)