@@ -64,14 +64,14 @@ internal class RadarVerificationManager(
6464 val verificationManager = this
6565 val lastTokenBeacons = beacons
6666
67- val profiler = RadarProfiler ()
68- profiler .start(" total" )
69- profiler .start(" getConfig" )
67+ val telemetry = RadarTelemetry ()
68+ telemetry .start(" total" )
69+ telemetry .start(" getConfig" )
7070
7171 val usage = " trackVerified"
7272 Radar .apiClient.getConfig(usage, true , object : RadarApiClient .RadarGetConfigApiCallback {
7373 override fun onComplete (status : Radar .RadarStatus , config : RadarConfig ? ) {
74- profiler .end(" getConfig" )
74+ telemetry .end(" getConfig" )
7575 if (status != Radar .RadarStatus .SUCCESS || config == null ) {
7676 Radar .handler.post {
7777 callback?.onComplete(status)
@@ -82,7 +82,7 @@ internal class RadarVerificationManager(
8282
8383 val googlePlayProjectNumber = config.googlePlayProjectNumber
8484
85- profiler .start(" getLocation" )
85+ telemetry .start(" getLocation" )
8686
8787 Radar .locationManager.getLocation(
8888 RadarTrackingOptions .RadarTrackingOptionsDesiredAccuracy .MEDIUM ,
@@ -94,7 +94,7 @@ internal class RadarVerificationManager(
9494 location : Location ? ,
9595 stopped : Boolean
9696 ) {
97- profiler .end(" getLocation" )
97+ telemetry .end(" getLocation" )
9898
9999 if (status != Radar .RadarStatus .SUCCESS || location == null ) {
100100 Radar .handler.post {
@@ -104,7 +104,7 @@ internal class RadarVerificationManager(
104104 return
105105 }
106106
107- profiler .start(" getIntegrityToken" )
107+ telemetry .start(" getIntegrityToken" )
108108
109109 val requestHash = verificationManager.getRequestHash(location)
110110
@@ -113,10 +113,10 @@ internal class RadarVerificationManager(
113113 requestHash
114114 ) { integrityToken, integrityException ->
115115
116- profiler .end(" getIntegrityToken" )
116+ telemetry .end(" getIntegrityToken" )
117117
118118 val callTrackApi = { beacons: Array <RadarBeacon >? ->
119- profiler .start(" trackAPI" )
119+ telemetry .start(" trackAPI" )
120120 Radar .apiClient.track(
121121 location,
122122 RadarState .getStopped(verificationManager.context),
@@ -140,7 +140,7 @@ internal class RadarVerificationManager(
140140 config : RadarConfig ? ,
141141 token : RadarVerifiedLocationToken ?
142142 ) {
143- profiler .end(" trackAPI" )
143+ telemetry .end(" trackAPI" )
144144 if (status == Radar .RadarStatus .SUCCESS ) {
145145 Radar .locationManager.updateTrackingFromMeta(
146146 config?.meta
@@ -152,8 +152,8 @@ internal class RadarVerificationManager(
152152 verificationManager.lastTokenBeacons = lastTokenBeacons
153153 }
154154
155- profiler .end(" total" )
156- logger.i(" trackVerified | ${profiler .formatted()} " , Radar .RadarLogType .PROFILER )
155+ telemetry .end(" total" )
156+ logger.i(" trackVerified | ${telemetry .formatted()} " , Radar .RadarLogType .TELEMETRY )
157157
158158 Radar .handler.post {
159159 callback?.onComplete(
@@ -167,7 +167,7 @@ internal class RadarVerificationManager(
167167
168168 if (beacons && Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
169169
170- profiler .start(" searchBeacons" )
170+ telemetry .start(" searchBeacons" )
171171 Radar .apiClient.searchBeacons(
172172 location,
173173 1000 ,
@@ -180,7 +180,7 @@ internal class RadarVerificationManager(
180180 uuids : Array <String >? ,
181181 uids : Array <String >?
182182 ) {
183- profiler .end(" searchBeacons" )
183+ telemetry .end(" searchBeacons" )
184184 if (! uuids.isNullOrEmpty() || ! uids.isNullOrEmpty()) {
185185 Radar .beaconManager.startMonitoringBeaconUUIDs(
186186 uuids,
@@ -202,15 +202,15 @@ internal class RadarVerificationManager(
202202 return
203203 }
204204
205- profiler .start(" trackAPI" )
205+ telemetry .start(" trackAPI" )
206206 callTrackApi(beacons)
207207 }
208208 })
209209 } else if (beacons != null ) {
210210 Radar .beaconManager.startMonitoringBeacons(
211211 beacons
212212 )
213- profiler .start(" rangeBeacons" )
213+ telemetry .start(" rangeBeacons" )
214214 Radar .beaconManager.rangeBeacons(
215215 beacons,
216216 false ,
@@ -219,7 +219,7 @@ internal class RadarVerificationManager(
219219 status : Radar .RadarStatus ,
220220 beacons : Array <RadarBeacon >?
221221 ) {
222- profiler .end(" rangeBeacons" )
222+ telemetry .end(" rangeBeacons" )
223223
224224 if (status != Radar .RadarStatus .SUCCESS || beacons == null ) {
225225 callTrackApi(null )
0 commit comments