-
Notifications
You must be signed in to change notification settings - Fork 1.3k
High Telemetry Data Usage #11979
Comments
/cc @rclee |
Hi @bgreenlee I apologize for the late response here. We're currently investigating the issue and adding more robust logging around these potential problem areas. During your testing, was this on a device with any other applications using location services? I'll let you know as soon as we have more information. Thank you for your patience. |
Hi, I work with Brad and did a bunch of testing for this issue. I can confirm it happens with a device running nothing else using location services. I set up a iPhone with a brand new OS install and turned off everything I could except for what was necessary to run our app which includes Mapbox Metrics. The data usage seems most significant when the phone is in motion. It's consistent with something asking for location with high frequency and then iOS requiring some cellular data to resolve location, probably related to cell tower or wifi geolocation. |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
From "apologize for the late response" to a high priority tag to auto-archived. Hopefully someone on the team can look at the data usage imposed by Mapbox Metrics some day. |
@NelsonMinar given that we're using combination of region monitoring and location manager apis for location traces collection both in foreground and background mode (you can dig into specifics of this logic here: https://github.com/mapbox/mapbox-events-ios). It is expected that location system service is pre-fetching location data tiles more aggressively at higher speeds to be able to calculate location estimates in a reasonable time. I'm trying to understand your expectations on background location data usage (given that user granted |
Thanks for the answer. I realize now we've never explained what our app does. It's a passive location tracker. It runs in the background listening for Significant Location Changes from iOS. When the user moves it records their locations to an internal database for occasional uploading to iCloud. It's a very passive app and we're not using any Mapbox APIs at all in background mode. We do have a foreground app mode which displays a Mapbox map, but our users seldom use it, maybe once a month. Our expectation is running our app in the background should use ~1MB / day for location tracking. That's what we observe with Mapbox Metrics turned off. But if we turn Metrics on the phone starts using 100MB/day or more, even when the app is entirely in the background (no map on display). As we noted above the usage is attributed to "Time & Location services", not our app itself, but it appears that Mapbox Metrics induces iOS to download a lot of data. I appreciate your explanation about location data tiles. That makes sense if the map were being displayed. But in background mode we're not displaying anything and have no use for Mapbox location data tiles. Are they being fetched anyway? Given the data usage is attributed to Time & Location services rather than our app, I'm a little skeptical. My own guess is iOS location monitoring uses a fair amount of data when it's turned on aggressively (ie, sampling movements once a second.) Cellular and WiFi positioning are the primary methods iOS uses for location and both of those require data. My guess is Mapbox Metrics is asking for locations very frequently and that results in iOS using a lot of data. But I haven't read your code to be sure, nor do I have access to Apple internals. |
@NelsonMinar thanks sharing more context about how Etsy app works - this is very helpful. I'm not sure whether the terms of service explicitly states that all Mapbox SDKs are collecting telemetry data (https://www.mapbox.com/telemetry/) but we do that irrespectively of whether user sees map view or not (given that user has granted permissions the app to access location in background).
I was not referring to Mapbox map data tiles in this context, but iOS Core Location Service, which is the system service that's responsible for geolocation on the device, including network location, which requires data in order to provide location estimates.
Your guess is correct and we do explicitly request location updates for a short period of time in background when a geofence area, that we set, is exited. You can dig into implementation details here: https://github.com/mapbox/mapbox-events-ios (let me know if you want to hop on a call to have a quick chat about it). Now i don't see anything unexpected in this behavior from the technical point of view, imho it's a product discussion (cc: @benlevin47, who's telemetry PM at Mapbox). Please let me know if this is helpful. |
@NelsonMinar any feedback on your end? what should be our next steps? |
Thank you for the followup and my apologies for the slow reply. You are correct that this is a product discussion, not a code bug. From my look through This behavior is just a mismatch for what our app does. Our app is running location tracking 24/7 but in as low impact a way as possible, using only significant location changes and doing basically no work on location changes except making a record. The app is never even in the foreground in normal usage, it's designed to be left running in the background and forgotten. We started looking at the MapBox code because the app was mysteriously using a lot of data. We now understand that it's Mapbox Metrics doing that, and why. My product suggest is to document the telemetry behavior in more detail at https://www.mapbox.com/telemetry/ or wherever you think is appropriate. Specifically that you closely track the user's location for a few minutes whenever the app gets a location update and that tracking can use more bandwidth as the phone is updating the user's position. If other MapBox users have a similar complaint, you might want to consider adding a second "lower impact" telemetry mode that works entirely passively. Never making any extra requests, but just recording the data that comes in. That would be a better match for our background use case. (PS: one misunderstanding, this app has nothing to do with Etsy. It's a private project. We only have a small handful of users and aren't a paying MapBox customer, so feel free to close this out if you have higher priorities.) |
@NelsonMinar thanks for your feedback, i've captured your recommendations:
and
in our internal tickets and will include them into our roadmap discussions. @chloekraw can we close the ticket for now? |
We have an iOS app that tracks location continually, in the background, in a resource-efficient way (using Significant Location Change monitoring). We noticed that Time & Location data usage (Cellular -> System Services -> Time & Location) is very high when Mapbox Metrics (Telemetry) is enabled—generally around 30 MB/day. If we disable it, Time & Location data usage is around 0.5 MB/day.
Platform: iOS
Mapbox SDK version: 4.0.1
Steps to trigger behavior
Expected behavior
Time & Location data usage should be minimal (< 1 MB/day)
Actual behavior
Time & Location data usage is significantly higher (~30 MB/day)
The text was updated successfully, but these errors were encountered: