@@ -73,14 +73,14 @@ internal class RadarVerificationManager(
7373 val verificationManager = this
7474 val lastTokenBeacons = beacons
7575
76- val profiler = RadarProfiler ()
77- profiler .start(" total" )
78- profiler .start(" getConfig" )
76+ val telemetry = RadarTelemetry ()
77+ telemetry .start(" total" )
78+ telemetry .start(" getConfig" )
7979
8080 val usage = " trackVerified"
8181 Radar .apiClient.getConfig(usage, true , object : RadarApiClient .RadarGetConfigApiCallback {
8282 override fun onComplete (status : Radar .RadarStatus , config : RadarConfig ? ) {
83- profiler .end(" getConfig" )
83+ telemetry .end(" getConfig" )
8484 if (status != Radar .RadarStatus .SUCCESS || config == null ) {
8585 Radar .handler.post {
8686 if (status != Radar .RadarStatus .SUCCESS ) {
@@ -95,7 +95,7 @@ internal class RadarVerificationManager(
9595
9696 val googlePlayProjectNumber = config.googlePlayProjectNumber
9797
98- profiler .start(" getLocation" )
98+ telemetry .start(" getLocation" )
9999
100100 Radar .locationManager.getLocation(
101101 desiredAccuracy,
@@ -107,7 +107,7 @@ internal class RadarVerificationManager(
107107 location : Location ? ,
108108 stopped : Boolean
109109 ) {
110- profiler .end(" getLocation" )
110+ telemetry .end(" getLocation" )
111111
112112 if (status != Radar .RadarStatus .SUCCESS || location == null ) {
113113 Radar .handler.post {
@@ -121,7 +121,7 @@ internal class RadarVerificationManager(
121121 return
122122 }
123123
124- profiler .start(" getIntegrityToken" )
124+ telemetry .start(" getIntegrityToken" )
125125
126126 val requestHash = verificationManager.getRequestHash(location)
127127
@@ -130,10 +130,10 @@ internal class RadarVerificationManager(
130130 requestHash
131131 ) { integrityToken, integrityException ->
132132
133- profiler .end(" getIntegrityToken" )
133+ telemetry .end(" getIntegrityToken" )
134134
135135 val callTrackApi = { beacons: Array <RadarBeacon >? ->
136- profiler .start(" trackAPI" )
136+ telemetry .start(" trackAPI" )
137137 Radar .apiClient.track(
138138 location,
139139 RadarState .getStopped(verificationManager.context),
@@ -159,7 +159,7 @@ internal class RadarVerificationManager(
159159 config : RadarConfig ? ,
160160 token : RadarVerifiedLocationToken ?
161161 ) {
162- profiler .end(" trackAPI" )
162+ telemetry .end(" trackAPI" )
163163 if (status == Radar .RadarStatus .SUCCESS ) {
164164 Radar .locationManager.updateTrackingFromMeta(
165165 config?.meta
@@ -171,8 +171,8 @@ internal class RadarVerificationManager(
171171 verificationManager.lastTokenBeacons = lastTokenBeacons
172172 }
173173
174- profiler .end(" total" )
175- logger.i(" trackVerified | ${profiler .formatted()} " , Radar .RadarLogType .PROFILER )
174+ telemetry .end(" total" )
175+ logger.i(" trackVerified | ${telemetry .formatted()} " , Radar .RadarLogType .TELEMETRY )
176176
177177 Radar .handler.post {
178178 if (status != Radar .RadarStatus .SUCCESS ) {
@@ -187,7 +187,7 @@ internal class RadarVerificationManager(
187187
188188 if (beacons && Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
189189
190- profiler .start(" searchBeacons" )
190+ telemetry .start(" searchBeacons" )
191191 Radar .apiClient.searchBeacons(
192192 location,
193193 1000 ,
@@ -200,7 +200,7 @@ internal class RadarVerificationManager(
200200 uuids : Array <String >? ,
201201 uids : Array <String >?
202202 ) {
203- profiler .end(" searchBeacons" )
203+ telemetry .end(" searchBeacons" )
204204 if (! uuids.isNullOrEmpty() || ! uids.isNullOrEmpty()) {
205205 Radar .beaconManager.startMonitoringBeaconUUIDs(
206206 uuids,
@@ -222,15 +222,15 @@ internal class RadarVerificationManager(
222222 return
223223 }
224224
225- profiler .start(" trackAPI" )
225+ telemetry .start(" trackAPI" )
226226 callTrackApi(beacons)
227227 }
228228 })
229229 } else if (beacons != null ) {
230230 Radar .beaconManager.startMonitoringBeacons(
231231 beacons
232232 )
233- profiler .start(" rangeBeacons" )
233+ telemetry .start(" rangeBeacons" )
234234 Radar .beaconManager.rangeBeacons(
235235 beacons,
236236 false ,
@@ -239,7 +239,7 @@ internal class RadarVerificationManager(
239239 status : Radar .RadarStatus ,
240240 beacons : Array <RadarBeacon >?
241241 ) {
242- profiler .end(" rangeBeacons" )
242+ telemetry .end(" rangeBeacons" )
243243
244244 if (status != Radar .RadarStatus .SUCCESS || beacons == null ) {
245245 callTrackApi(null )
0 commit comments