|
| 1 | +/* |
| 2 | + File: Instabug/IBGAPM.h |
| 3 | + |
| 4 | + Contains: API for using Instabug's SDK. |
| 5 | + |
| 6 | + Copyright: (c) 2013-2020 by Instabug, Inc., all rights reserved. |
| 7 | + |
| 8 | + Version: 10.1.2 |
| 9 | + */ |
| 10 | + |
| 11 | +#import <Foundation/Foundation.h> |
| 12 | +#import "IBGTypes.h" |
| 13 | + |
| 14 | +@class IBGExecutionTrace; |
| 15 | + |
| 16 | +NS_ASSUME_NONNULL_BEGIN |
| 17 | + |
| 18 | +NS_SWIFT_NAME(APM) |
| 19 | +/// Instabug APM |
| 20 | +@interface IBGAPM : NSObject |
| 21 | + |
| 22 | +/// Disables/Enables APM. |
| 23 | +/// |
| 24 | +/// Defaults to true if APM is included in your Instabug account's plan. |
| 25 | +@property (class, atomic, assign) BOOL enabled; |
| 26 | + |
| 27 | +/// Disables/Enables App Launch tracking. |
| 28 | +/// |
| 29 | +/// Defaults to true if APM is enabled. If APM is disabled, App Launch time will not be captured. |
| 30 | +@property (class, atomic, assign) BOOL appLaunchEnabled; |
| 31 | + |
| 32 | +/// Disables/Enables Automatic UI Traces. |
| 33 | +/// |
| 34 | +/// Defaults to true if APM is enabled. If APM is disabled, no Automatic UI Traces will be captured. |
| 35 | +@property (class, atomic, assign) BOOL autoUITraceEnabled; |
| 36 | + |
| 37 | +/// Creates and starts a new Execution Trace with the given name. |
| 38 | +/// |
| 39 | +/// Creates and starts an Execution trace with the specified name, returns nil in case APM is disabled. |
| 40 | +/// |
| 41 | +/// Multiple traces can start in parallel, including those with identical names. |
| 42 | +/// |
| 43 | +/// If the Execution Trace is not ended, it will be discarded. |
| 44 | +/// |
| 45 | +/// Execution Trace name cannot exceed 150 characters otherwise it's trimmed, leading and trailing whitespaces are also ignored. |
| 46 | +/// |
| 47 | +/// This API is thread safe. |
| 48 | +/// |
| 49 | +/// @param name Execution Trace name. |
| 50 | ++ (IBGExecutionTrace *_Nullable)startExecutionTraceWithName:(NSString *)name; |
| 51 | + |
| 52 | +/// Starts a Custom UI Trace with the given name. |
| 53 | +/// |
| 54 | +/// Starts a Custom UI Trace with the specified name. If APM is disabled, Custom UI Traces are not captured. |
| 55 | +/// |
| 56 | +/// Custom UI Traces cannot run in parallel, one must be ended before the other is started. |
| 57 | +/// |
| 58 | +/// Custom UI Trace name cannot exceed 150 characters otherwise it's trimmed, leading and trailing whitespaces are also ignored. |
| 59 | +/// |
| 60 | +/// This API should be called from the main thread. |
| 61 | +/// |
| 62 | +/// @param name Custom UI Trace name. |
| 63 | ++ (void)startUITraceWithName:(NSString *)name; |
| 64 | + |
| 65 | +/// Ends the current running Custom UI Trace. |
| 66 | ++ (void)endUITrace; |
| 67 | + |
| 68 | +/// Sets the printed logs priority. Filter to one of the following levels. |
| 69 | +/// |
| 70 | +/// Sets the printed logs priority. Filter to one of the following levels: |
| 71 | +/// |
| 72 | +/// - IBGLogLevelNone disables all APM SDK console logs. |
| 73 | +/// |
| 74 | +/// - IBGLogLevelError prints errors only, we use this level to let you know if something goes wrong. |
| 75 | +/// |
| 76 | +/// - IBGLogLevelWarning displays warnings that will not necessarily lead to errors but should be addressed nonetheless. |
| 77 | +/// |
| 78 | +/// - IBGLogLevelInfo (default) logs information that we think is useful without being too verbose. |
| 79 | +/// |
| 80 | +/// - IBGLogLevelDebug use this in case you are debugging an issue. Not recommended for production use. |
| 81 | +/// |
| 82 | +/// - IBGLogLevelVerbose use this only if IBGLogLevelDEBUG was not enough and you need more visibility |
| 83 | +/// on what is going on under the hood. |
| 84 | +/// |
| 85 | +/// Similar to the IBGLogLevelDebug level, this is not meant to be used on production environments. |
| 86 | +/// |
| 87 | +/// Each log level will also include logs from all the levels above it. For instance, |
| 88 | +/// IBGLogLevelInfo will include IBGLogLevelInfo logs as well as IBGLogLevelWarning |
| 89 | +/// and IBGLogLevelError logs. |
| 90 | +@property (class, atomic, assign) IBGLogLevel logLevel; |
| 91 | + |
| 92 | +@end |
| 93 | + |
| 94 | +NS_ASSUME_NONNULL_END |
0 commit comments