diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2019-03-05 16:24:05 -0800 |
---|---|---|
committer | Fabian Guerra <fabian.guerra@mapbox.com> | 2019-03-28 15:05:26 -0700 |
commit | 1cc38bebf022f87a3b5698162028255f0c99c325 (patch) | |
tree | 34f36b17a173ed2bb9355507ab7accdfe6275685 /platform/darwin/src/MGLNetworkConfiguration.m | |
parent | a2f0ce505b6f714f130746be7cb9409667174cbc (diff) | |
download | qtlocation-mapboxgl-1cc38bebf022f87a3b5698162028255f0c99c325.tar.gz |
[ios, macos] Make MGLMetricsDelegate follow delegate convention.
Diffstat (limited to 'platform/darwin/src/MGLNetworkConfiguration.m')
-rw-r--r-- | platform/darwin/src/MGLNetworkConfiguration.m | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/darwin/src/MGLNetworkConfiguration.m b/platform/darwin/src/MGLNetworkConfiguration.m index 5682e0bc1e..f938bcc753 100644 --- a/platform/darwin/src/MGLNetworkConfiguration.m +++ b/platform/darwin/src/MGLNetworkConfiguration.m @@ -1,7 +1,6 @@ #import "MGLNetworkConfiguration_Private.h" #import "MGLMetricsManager_Private.h" -NSString * const kMGLDownloadPerformanceEvent = @"mobile.performance_trace"; static NSString * const MGLStartTime = @"start_time"; static NSString * const MGLResourceType = @"resource_type"; @@ -73,7 +72,7 @@ static NSString * const MGLResourceType = @"resource_type"; { if (urlString && [self.events objectForKey:urlString]) { NSDictionary *eventAttributes = [self eventAttributesForURL:urlString withAction:action]; - [[MGLMetricsManager sharedManager] handleMetricEvent:MGLMetricTypePerformance withAttributes:eventAttributes]; + [[MGLMetricsManager sharedManager] handleMetricsEvent:MGLMetricTypePerformance withAttributes:eventAttributes]; [self.events removeObjectForKey:urlString]; } } @@ -94,9 +93,9 @@ static NSString * const MGLResourceType = @"resource_type"; if (action) { [attributes addObject:@{ @"name" : @"action" , @"value" : action }]; } - + NSString *event = MGLStringFromMetricType(MGLMetricTypePerformance); return @{ - @"event" : kMGLPerformanceMetric, + @"event" : event, @"created" : createdDate, @"sessionId" : [NSUUID UUID].UUIDString, @"counters" : @[ @{ @"name" : @"elapsed_time" , @"value" : @(elapsedTime) } ], |