blob: 73756cebed39f2b8568fe60fb6346f5bde0c365d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#import <Foundation/Foundation.h>
#import "MGLFoundation.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, MGLMetricType) {
MGLMetricTypePerformance = 0,
};
@protocol MGLMetricsDelegate <NSObject>
- (BOOL)shouldHandleMetric:(MGLMetricType)metricType;
- (void)didCollectMetric:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes;
@end
typedef void (^MGLEventHandler)(NSString *eventName, NSDictionary *attributes);
MGL_EXPORT
@interface MGLMetricsManager : NSObject
@property (class, nonatomic, readonly) MGLMetricsManager *sharedManager;
@property (nonatomic, weak) id<MGLMetricsDelegate> delegate;
#if TARGET_OS_IOS
- (void)pushMetric:(MGLMetricType)metricType withAttributes:(NSDictionary *)attributes;
#endif
@end
NS_ASSUME_NONNULL_END
|