forked from getsentry/sentry-cocoa
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathSentryClient.h
125 lines (106 loc) · 3.97 KB
/
SentryClient.h
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#import "SentryDefines.h"
@class SentryOptions, SentrySession, SentryEvent, SentryEnvelope, SentryScope, SentryFileManager,
SentryId, SentryUserFeedback, SentryTransaction;
NS_ASSUME_NONNULL_BEGIN
NS_SWIFT_NAME(Client)
@interface SentryClient : NSObject
SENTRY_NO_INIT
@property (nonatomic, strong) SentryOptions *options;
/**
* Initializes a SentryClient. Pass in an dictionary of options.
*
* @param options Options dictionary
* @return SentryClient
*/
- (_Nullable instancetype)initWithOptions:(SentryOptions *)options;
/**
* Captures a manually created event and sends it to Sentry.
*
* @param event The event to send to Sentry.
*
* @return The SentryId of the event or SentryId.empty if the event is not sent.
*/
- (SentryId *)captureEvent:(SentryEvent *)event NS_SWIFT_NAME(capture(event:));
/**
* Captures a manually created event and sends it to Sentry.
*
* @param event The event to send to Sentry.
* @param scope The scope containing event metadata.
*
* @return The SentryId of the event or SentryId.empty if the event is not sent.
*/
- (SentryId *)captureEvent:(SentryEvent *)event
withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(event:scope:));
/**
* Captures an error event and sends it to Sentry.
*
* @param error The error to send to Sentry.
*
* @return The SentryId of the event or SentryId.empty if the event is not sent.
*/
- (SentryId *)captureError:(NSError *)error NS_SWIFT_NAME(capture(error:));
/**
* Captures an error event and sends it to Sentry.
*
* @param error The error to send to Sentry.
* @param scope The scope containing event metadata.
*
* @return The SentryId of the event or SentryId.empty if the event is not sent.
*/
- (SentryId *)captureError:(NSError *)error
withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(error:scope:));
/**
* Captures an exception event and sends it to Sentry.
*
* @param exception The exception to send to Sentry.
*
* @return The SentryId of the event or SentryId.empty if the event is not sent.
*/
- (SentryId *)captureException:(NSException *)exception NS_SWIFT_NAME(capture(exception:));
/**
* Captures an exception event and sends it to Sentry.
*
* @param exception The exception to send to Sentry.
* @param scope The scope containing event metadata.
*
* @return The SentryId of the event or SentryId.empty if the event is not sent.
*/
- (SentryId *)captureException:(NSException *)exception
withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(exception:scope:));
/**
* Captures a message event and sends it to Sentry.
*
* @param message The message to send to Sentry.
*
* @return The SentryId of the event or SentryId.empty if the event is not sent.
*/
- (SentryId *)captureMessage:(NSString *)message NS_SWIFT_NAME(capture(message:));
/**
* Captures a message event and sends it to Sentry.
*
* @param message The message to send to Sentry.
* @param scope The scope containing event metadata.
*
* @return The SentryId of the event or SentryId.empty if the event is not sent.
*/
- (SentryId *)captureMessage:(NSString *)message
withScope:(SentryScope *)scope NS_SWIFT_NAME(capture(message:scope:));
/**
* Captures a manually created user feedback and sends it to Sentry.
*
* @param userFeedback The user feedback to send to Sentry.
*/
- (void)captureUserFeedback:(SentryUserFeedback *)userFeedback
NS_SWIFT_NAME(capture(userFeedback:));
- (void)captureSession:(SentrySession *)session NS_SWIFT_NAME(capture(session:));
- (void)captureEnvelope:(SentryEnvelope *)envelope NS_SWIFT_NAME(capture(envelope:));
/**
* Waits synchronously for the SDK to flush out all queued and cached items for up to the specified
* timeout in seconds. If there is no internet connection, the function returns immediately. The SDK
* doesn't dispose the client or the hub.
*
* @param timeout The time to wait for the SDK to complete the flush.
*/
- (void)flush:(NSTimeInterval)timeout NS_SWIFT_NAME(flush(timeout:));
@end
NS_ASSUME_NONNULL_END