Skip to content

Commit e830592

Browse files
github-actions[bot]Firefox Sync Engineering
andauthored
Auto update with latest AS Release v93.5.0 (#63)
* Updates Package.swift with v93.5.0 release * Version 93.5.0 Co-authored-by: Firefox Sync Engineering <[email protected]>
1 parent 14cf9b7 commit e830592

File tree

6 files changed

+158
-164
lines changed

6 files changed

+158
-164
lines changed

Package.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// swift-tools-version:5.4
22
import PackageDescription
33

4-
let checksum = "eae99a001f9d86e7013c4d5809aea788ff2483f76faef0b1e8480255ad33228a"
5-
let version = "v93.3.0"
4+
let checksum = "c0fef268c261df79fcf6a0aaefa77ff075686ce9e62d931e273feb99f870faa9"
5+
let version = "v93.5.0"
66
let url = "https://github.com/mozilla/application-services/releases/download/\(version)/MozillaRustComponents.xcframework.zip"
77

88
// Focus xcframework
9-
let focusChecksum = "e869cfa05ba8f1937786ea4ff32c0e373d7c90628b7e6603831d78002a88195e"
9+
let focusChecksum = "9a2ee84501025da34dcd93ffef07b2f087b03b60a37706544ab5f5a1ed9a3d0b"
1010
let focusUrl = "https://github.com/mozilla/application-services/releases/download/\(version)/FocusRustComponents.xcframework.zip"
1111
let package = Package(
1212
name: "MozillaRustComponentsSwift",

swift-source/all/Generated/Metrics/Metrics.swift

Lines changed: 94 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// -*- mode: Swift -*-
22

3-
// AUTOGENERATED BY glean_parser. DO NOT EDIT. DO NOT COMMIT.
3+
// AUTOGENERATED BY glean_parser v6.1.1. DO NOT EDIT. DO NOT COMMIT.
44

55
/* This Source Code Form is subject to the terms of the Mozilla Public
66
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,7 +22,7 @@ extension GleanMetrics {
2222
// Intentionally left private, no external user can instantiate a new global object.
2323
}
2424

25-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2022, month: 6, day: 7, hour: 15, minute: 6, second: 51))
25+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2022, month: 6, day: 16, hour: 18, minute: 44, second: 22))
2626
}
2727

2828
enum NimbusEvents {
@@ -31,24 +31,20 @@ extension GleanMetrics {
3131
var enrollmentId: String?
3232
var experiment: String?
3333

34-
func toFfiExtra() -> ([Int32], [String]) {
35-
var keys = [Int32]()
36-
var values = [String]()
34+
func toExtraRecord() -> [String: String] {
35+
var record = [String: String]()
3736

3837
if let branch = self.branch {
39-
keys.append(0)
40-
values.append(String(branch))
38+
record["branch"] = String(branch)
4139
}
4240
if let enrollmentId = self.enrollmentId {
43-
keys.append(1)
44-
values.append(String(enrollmentId))
41+
record["enrollment_id"] = String(enrollmentId)
4542
}
4643
if let experiment = self.experiment {
47-
keys.append(2)
48-
values.append(String(experiment))
44+
record["experiment"] = String(experiment)
4945
}
5046

51-
return (keys, values)
47+
return record
5248
}
5349
}
5450

@@ -57,24 +53,20 @@ extension GleanMetrics {
5753
var enrollmentId: String?
5854
var experiment: String?
5955

60-
func toFfiExtra() -> ([Int32], [String]) {
61-
var keys = [Int32]()
62-
var values = [String]()
56+
func toExtraRecord() -> [String: String] {
57+
var record = [String: String]()
6358

6459
if let branch = self.branch {
65-
keys.append(0)
66-
values.append(String(branch))
60+
record["branch"] = String(branch)
6761
}
6862
if let enrollmentId = self.enrollmentId {
69-
keys.append(1)
70-
values.append(String(enrollmentId))
63+
record["enrollment_id"] = String(enrollmentId)
7164
}
7265
if let experiment = self.experiment {
73-
keys.append(2)
74-
values.append(String(experiment))
66+
record["experiment"] = String(experiment)
7567
}
7668

77-
return (keys, values)
69+
return record
7870
}
7971
}
8072

@@ -83,24 +75,20 @@ extension GleanMetrics {
8375
var enrollmentId: String?
8476
var experiment: String?
8577

86-
func toFfiExtra() -> ([Int32], [String]) {
87-
var keys = [Int32]()
88-
var values = [String]()
78+
func toExtraRecord() -> [String: String] {
79+
var record = [String: String]()
8980

9081
if let branch = self.branch {
91-
keys.append(0)
92-
values.append(String(branch))
82+
record["branch"] = String(branch)
9383
}
9484
if let enrollmentId = self.enrollmentId {
95-
keys.append(1)
96-
values.append(String(enrollmentId))
85+
record["enrollment_id"] = String(enrollmentId)
9786
}
9887
if let experiment = self.experiment {
99-
keys.append(2)
100-
values.append(String(experiment))
88+
record["experiment"] = String(experiment)
10189
}
10290

103-
return (keys, values)
91+
return record
10492
}
10593
}
10694

@@ -109,122 +97,136 @@ extension GleanMetrics {
10997
var enrollmentId: String?
11098
var experiment: String?
11199

112-
func toFfiExtra() -> ([Int32], [String]) {
113-
var keys = [Int32]()
114-
var values = [String]()
100+
func toExtraRecord() -> [String: String] {
101+
var record = [String: String]()
115102

116103
if let branch = self.branch {
117-
keys.append(0)
118-
values.append(String(branch))
104+
record["branch"] = String(branch)
119105
}
120106
if let enrollmentId = self.enrollmentId {
121-
keys.append(1)
122-
values.append(String(enrollmentId))
107+
record["enrollment_id"] = String(enrollmentId)
123108
}
124109
if let experiment = self.experiment {
125-
keys.append(2)
126-
values.append(String(experiment))
110+
record["experiment"] = String(experiment)
127111
}
128112

129-
return (keys, values)
113+
return record
130114
}
131115
}
132116

133117
/// Recorded when a user has met the conditions and is first bucketed into an
134118
/// experiment (i.e. targeting matched and they were randomized into a bucket and
135119
/// branch of the experiment). Expected a maximum of once per experiment per user.
136120
static let enrollment = EventMetricType<NoExtraKeys, EnrollmentExtra>( // generated from nimbus_events.enrollment
137-
category: "nimbus_events",
138-
name: "enrollment",
139-
sendInPings: ["events"],
140-
lifetime: .ping,
141-
disabled: false,
142-
allowedExtraKeys: ["branch", "enrollment_id", "experiment"]
121+
CommonMetricData(
122+
category: "nimbus_events",
123+
name: "enrollment",
124+
sendInPings: ["events"],
125+
lifetime: .ping,
126+
disabled: false
127+
)
128+
, ["branch", "enrollment_id", "experiment"]
143129
)
144130

145131
/// Recorded when either telemetry is disabled, or the experiment has run for its
146132
/// designed duration (i.e. it is no longer present in the Nimbus Remote Settings
147133
/// collection)
148134
static let unenrollment = EventMetricType<NoExtraKeys, UnenrollmentExtra>( // generated from nimbus_events.unenrollment
149-
category: "nimbus_events",
150-
name: "unenrollment",
151-
sendInPings: ["events"],
152-
lifetime: .ping,
153-
disabled: false,
154-
allowedExtraKeys: ["branch", "enrollment_id", "experiment"]
135+
CommonMetricData(
136+
category: "nimbus_events",
137+
name: "unenrollment",
138+
sendInPings: ["events"],
139+
lifetime: .ping,
140+
disabled: false
141+
)
142+
, ["branch", "enrollment_id", "experiment"]
155143
)
156144

157145
/// Recorded when a user becomes ineligible to continue receiving the treatment for
158146
/// an enrolled experiment, for reasons such as the user opting out of the
159147
/// experiment or no longer matching targeting for the experiment.
160148
static let disqualification = EventMetricType<NoExtraKeys, DisqualificationExtra>( // generated from nimbus_events.disqualification
161-
category: "nimbus_events",
162-
name: "disqualification",
163-
sendInPings: ["events"],
164-
lifetime: .ping,
165-
disabled: false,
166-
allowedExtraKeys: ["branch", "enrollment_id", "experiment"]
149+
CommonMetricData(
150+
category: "nimbus_events",
151+
name: "disqualification",
152+
sendInPings: ["events"],
153+
lifetime: .ping,
154+
disabled: false
155+
)
156+
, ["branch", "enrollment_id", "experiment"]
167157
)
168158

169159
/// Recorded when a user actually observes an experimental treatment, or would have
170160
/// observed an experimental treatment if they had been in a branch that would have
171161
/// shown one.
172162
static let exposure = EventMetricType<NoExtraKeys, ExposureExtra>( // generated from nimbus_events.exposure
173-
category: "nimbus_events",
174-
name: "exposure",
175-
sendInPings: ["events"],
176-
lifetime: .ping,
177-
disabled: false,
178-
allowedExtraKeys: ["branch", "enrollment_id", "experiment"]
163+
CommonMetricData(
164+
category: "nimbus_events",
165+
name: "exposure",
166+
sendInPings: ["events"],
167+
lifetime: .ping,
168+
disabled: false
169+
)
170+
, ["branch", "enrollment_id", "experiment"]
179171
)
180172

181173
}
182174

183175
enum LoginsStoreMigration {
184176
/// The total number of login records processed by the migration
185177
static let numProcessed = CounterMetricType( // generated from logins_store_migration.num_processed
186-
category: "logins_store_migration",
187-
name: "num_processed",
188-
sendInPings: ["metrics"],
189-
lifetime: .ping,
190-
disabled: false
178+
CommonMetricData(
179+
category: "logins_store_migration",
180+
name: "num_processed",
181+
sendInPings: ["metrics"],
182+
lifetime: .ping,
183+
disabled: false
184+
)
191185
)
192186

193187
/// The total number of login records successfully migrated
194188
static let numSucceeded = CounterMetricType( // generated from logins_store_migration.num_succeeded
195-
category: "logins_store_migration",
196-
name: "num_succeeded",
197-
sendInPings: ["metrics"],
198-
lifetime: .ping,
199-
disabled: false
189+
CommonMetricData(
190+
category: "logins_store_migration",
191+
name: "num_succeeded",
192+
sendInPings: ["metrics"],
193+
lifetime: .ping,
194+
disabled: false
195+
)
200196
)
201197

202198
/// The total number of login records which failed to migrate
203199
static let numFailed = CounterMetricType( // generated from logins_store_migration.num_failed
204-
category: "logins_store_migration",
205-
name: "num_failed",
206-
sendInPings: ["metrics"],
207-
lifetime: .ping,
208-
disabled: false
200+
CommonMetricData(
201+
category: "logins_store_migration",
202+
name: "num_failed",
203+
sendInPings: ["metrics"],
204+
lifetime: .ping,
205+
disabled: false
206+
)
209207
)
210208

211209
/// How long the migration tool
212210
static let totalDuration = TimespanMetricType( // generated from logins_store_migration.total_duration
213-
category: "logins_store_migration",
214-
name: "total_duration",
215-
sendInPings: ["metrics"],
216-
lifetime: .ping,
217-
disabled: false,
218-
timeUnit: .millisecond
211+
CommonMetricData(
212+
category: "logins_store_migration",
213+
name: "total_duration",
214+
sendInPings: ["metrics"],
215+
lifetime: .ping,
216+
disabled: false
217+
)
218+
, .millisecond
219219
)
220220

221221
/// Errors discovered in the migration.
222222
static let errors = StringListMetricType( // generated from logins_store_migration.errors
223-
category: "logins_store_migration",
224-
name: "errors",
225-
sendInPings: ["metrics"],
226-
lifetime: .ping,
227-
disabled: false
223+
CommonMetricData(
224+
category: "logins_store_migration",
225+
name: "errors",
226+
sendInPings: ["metrics"],
227+
lifetime: .ping,
228+
disabled: false
229+
)
228230
)
229231

230232
}

swift-source/all/Logins/LoginsStorage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func recordMigrationMetrics(jsonString: String) {
165165
GleanMetrics.LoginsStoreMigration.numFailed.add(failed)
166166
}
167167

168-
if let duration = metrics["total_duration"] as? UInt64 {
168+
if let duration = metrics["total_duration"] as? Int64 {
169169
GleanMetrics.LoginsStoreMigration.totalDuration.setRawNanos(duration * 1_000_000)
170170
}
171171

swift-source/all/Nimbus/Nimbus.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ extension Nimbus: FeaturesInterface {
9494
internal func recordExperimentTelemetry(_ experiments: [EnrolledExperiment]) {
9595
for experiment in experiments {
9696
Glean.shared.setExperimentActive(
97-
experimentId: experiment.slug,
97+
experiment.slug,
9898
branch: experiment.branchSlug,
9999
extra: ["enrollmentId": experiment.enrollmentId]
100100
)

0 commit comments

Comments
 (0)