Skip to content

Commit ec130da

Browse files
committed
Merge branch 'release-v67.5.0' into release
2 parents 5f21b1f + 17d7f03 commit ec130da

21 files changed

Lines changed: 347 additions & 18 deletions

File tree

.buildconfig.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
libraryVersion: 67.4.0
1+
libraryVersion: 67.5.0
22
groupId: org.mozilla.telemetry
33
projects:
44
glean:

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Unreleased changes
22

3-
[Full changelog](https://github.com/mozilla/glean/compare/v67.4.0...main)
3+
[Full changelog](https://github.com/mozilla/glean/compare/v67.5.0...main)
4+
5+
# v67.5.0 (2026-06-09)
6+
7+
[Full changelog](https://github.com/mozilla/glean/compare/v67.4.0...v67.5.0)
8+
9+
* General
10+
* Add clear_attribution_data and clear_distribution_data General APIs to clear core attribution and distribution data ([bug 2043535](https://bugzilla.mozilla.org/show_bug.cgi?id=2043535)).
411

512
# v67.4.0 (2026-06-09)
613

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DEPENDENCIES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4398,9 +4398,9 @@ SOFTWARE.
43984398

43994399
The following text applies to code linked from these dependencies:
44004400

4401-
* [glean-core 67.4.0]( https://github.com/mozilla/glean )
4401+
* [glean-core 67.5.0]( https://github.com/mozilla/glean )
44024402
* [glean-build 20.0.0]( https://github.com/mozilla/glean )
4403-
* [glean 67.4.0]( https://github.com/mozilla/glean )
4403+
* [glean 67.5.0]( https://github.com/mozilla/glean )
44044404
* [zeitstempel 0.2.1]( https://github.com/badboy/zeitstempel )
44054405

44064406
```

docs/user/reference/general/attribution-api.md

Lines changed: 112 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,61 @@ so it relies on products setting and keeping these values up-to-date via general
1010

1111
## Recording API
1212

13+
### `clearAttribution`
14+
15+
Clears the values sent in the `client_info.attribution` section.
16+
17+
{{#include ../../../shared/tab_header.md}}
18+
19+
<div data-lang="Kotlin" class="tab">
20+
21+
```Kotlin
22+
Glean.clearAttribution()
23+
```
24+
</div>
25+
26+
<div data-lang="Java" class="tab"></div>
27+
28+
<div data-lang="Swift" class="tab">
29+
30+
```Swift
31+
Glean.shared.clearAttribution()
32+
```
33+
</div>
34+
35+
<div data-lang="Python" class="tab">
36+
37+
```Python
38+
from glean import Glean
39+
40+
Glean.clear_attribution()
41+
```
42+
</div>
43+
44+
<div data-lang="JavaScript" class="tab"></div>
45+
46+
<div data-lang="Rust" class="tab">
47+
48+
```Rust
49+
glean::clear_attribution();
50+
```
51+
</div>
52+
53+
<div data-lang="Firefox Desktop" class="tab">
54+
55+
**C++**
56+
57+
C++ is not presently supported.
58+
59+
**JavaScript**
60+
61+
```js
62+
Services.fog.clearAttribution();
63+
```
64+
</div>
65+
66+
{{#include ../../../shared/tab_footer.md}}
67+
1368
### `updateAttribution`
1469

1570
Updates the values sent in the `client_info.attribution` section.
@@ -105,6 +160,61 @@ Services.fog.updateAttribution(
105160
* Each `AttributionMetrics` field may report errors like `string` metrics do.
106161
{{#include ../../_includes/string-errors.md}}
107162

163+
### `clearDistribution`
164+
165+
Clears the values sent in the `client_info.distribution` section.
166+
167+
{{#include ../../../shared/tab_header.md}}
168+
169+
<div data-lang="Kotlin" class="tab">
170+
171+
```Kotlin
172+
Glean.clearDistribution()
173+
```
174+
</div>
175+
176+
<div data-lang="Java" class="tab"></div>
177+
178+
<div data-lang="Swift" class="tab">
179+
180+
```Swift
181+
Glean.shared.clearDistribution()
182+
```
183+
</div>
184+
185+
<div data-lang="Python" class="tab">
186+
187+
```Python
188+
from glean import Glean
189+
190+
Glean.clear_distribution()
191+
```
192+
</div>
193+
194+
<div data-lang="JavaScript" class="tab"></div>
195+
196+
<div data-lang="Rust" class="tab">
197+
198+
```Rust
199+
glean::clear_distribution();
200+
```
201+
</div>
202+
203+
<div data-lang="Firefox Desktop" class="tab">
204+
205+
**C++**
206+
207+
C++ is not presently supported.
208+
209+
**JavaScript**
210+
211+
```js
212+
Services.fog.clearDistribution();
213+
```
214+
</div>
215+
216+
{{#include ../../../shared/tab_footer.md}}
217+
108218
### `updateDistribution`
109219

110220
Updates the value sent in the `client_info.distribution` section.
@@ -137,7 +247,7 @@ Glean.shared.updateDistribution(DistributionMetrics(
137247
from glean import Glean
138248
from glean.metrics import DistributionMetrics
139249

140-
Glean.update_attribution(DistributionMetrics(
250+
Glean.update_distribution(DistributionMetrics(
141251
name="MozillaOnline",
142252
))
143253
```
@@ -148,7 +258,7 @@ Glean.update_attribution(DistributionMetrics(
148258
<div data-lang="Rust" class="tab">
149259

150260
```Rust
151-
glean::update_attribution(DistributionMetrics {
261+
glean::update_distribution(DistributionMetrics {
152262
name: Some("MozillaOnline".into()),
153263
});
154264
```

glean-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "glean-core"
3-
version = "67.4.0"
3+
version = "67.5.0"
44
authors = ["Jan-Erik Rediger <jrediger@mozilla.com>", "The Glean Team <glean-team@mozilla.com>"]
55
description = "A modern Telemetry library"
66
repository = "https://github.com/mozilla/glean"

glean-core/android/src/main/java/mozilla/telemetry/glean/Glean.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,12 @@ open class GleanInternalAPI internal constructor() {
763763
return isMainProcess as Boolean
764764
}
765765

766+
/**
767+
* Clears the core attribution data.
768+
* Does not clear glean.attribution.ext (if present).
769+
*/
770+
fun clearAttribution() = gleanClearAttribution()
771+
766772
/**
767773
* Updates attribution fields with new values.
768774
* AttributionMetrics fields with `null` values will not overwrite older values.
@@ -777,6 +783,12 @@ open class GleanInternalAPI internal constructor() {
777783
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
778784
fun testGetAttribution(): AttributionMetrics = gleanTestGetAttribution()
779785

786+
/**
787+
* Clears the core distribution data.
788+
* Does not clear glean.distribution.ext (if present).
789+
*/
790+
fun clearDistribution() = gleanClearDistribution()
791+
780792
/**
781793
* Updates distribution fields with new values.
782794
* DistributionMetrics fields with `null` values will not overwrite older values.

glean-core/benchmark/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glean-core/ios/Glean/Glean.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,12 @@ public final class Glean: @unchecked Sendable {
645645
)
646646
}
647647

648+
/// Clears the core attribution data.
649+
/// Does not clear glean.attribution.ext (if present).
650+
public func clearAttribution() {
651+
gleanClearAttribution()
652+
}
653+
648654
/// Updates attribution fields with new values.
649655
/// AttributionMetrics fields with `null` values will not overwrite older values.
650656
public func updateAttribution(attribution: AttributionMetrics) {
@@ -658,6 +664,12 @@ public final class Glean: @unchecked Sendable {
658664
gleanTestGetAttribution()
659665
}
660666

667+
/// Clears the core distribution data.
668+
/// Does not clear glean.distribution.ext (if present).
669+
public func clearDistribution() {
670+
gleanClearDistribution()
671+
}
672+
661673
/// Updates distribution fields with new values.
662674
/// DistributionMetrics fields with `null` values will not overwrite older values.
663675
public func updateDistribution(distribution: DistributionMetrics) {

glean-core/python/glean/glean.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,14 @@ def shutdown(cls):
522522
# we also wait for the process dispatcher to finish.
523523
ProcessDispatcher._wait_for_last_process()
524524

525+
@classmethod
526+
def clear_attribution(cls) -> None:
527+
"""
528+
Clears the core attribution data.
529+
Does not clear glean.attribution.ext (if present).
530+
"""
531+
_uniffi.glean_clear_attribution()
532+
525533
@classmethod
526534
def update_attribution(cls, attribution: "AttributionMetrics") -> None:
527535
"""
@@ -537,6 +545,14 @@ def test_get_attribution(cls) -> "AttributionMetrics":
537545
"""
538546
return _uniffi.glean_test_get_attribution()
539547

548+
@classmethod
549+
def clear_distribution(cls) -> None:
550+
"""
551+
Clears the core distribution data.
552+
Does not clear glean.distribution.ext (if present).
553+
"""
554+
_uniffi.glean_clear_distribution()
555+
540556
@classmethod
541557
def update_distribution(cls, distribution: "DistributionMetrics") -> None:
542558
"""

0 commit comments

Comments
 (0)