You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. You can create a new instance of the ExceptionlessClient and specify the `apiKey`, `serverUrl` or [configuration object](https://github.com/exceptionless/Exceptionless.JavaScript/blob/master/src/configuration/IConfigurationSettings.ts).
45
-
```javascript
49
+
50
+
```javascript
46
51
var client =newexceptionless.ExceptionlessClient('API_KEY_HERE');
47
52
// or with a api key and server url.
48
53
var client =newexceptionless.ExceptionlessClient('API_KEY_HERE', 'http://localhost:50000');
@@ -56,24 +61,27 @@ var client = new exceptionless.ExceptionlessClient({
56
61
57
62
#### Node.js
58
63
1. You can set the `apiKey` on the default ExceptionlessClient instance.
64
+
59
65
```javascript
60
-
var client =require('exceptionless.node').ExceptionlessClient.default;
61
-
client.config.apiKey='API_KEY_HERE';
62
-
```
66
+
var client =require('exceptionless.node').ExceptionlessClient.default;
67
+
client.config.apiKey='API_KEY_HERE';
68
+
```
69
+
63
70
2. You can create a new instance of the ExceptionlessClient and specify the `apiKey`, `serverUrl` or [configuration object](https://github.com/exceptionless/Exceptionless.JavaScript/blob/master/src/configuration/IConfigurationSettings.ts).
71
+
64
72
```javascript
65
-
var exceptionless =require('exceptionless.node');
66
-
67
-
var client =newexceptionless.ExceptionlessClient('API_KEY_HERE');
68
-
// or with a api key and server url.
69
-
var client =newexceptionless.ExceptionlessClient('API_KEY_HERE', 'http://localhost:50000');
70
-
// or with a configuration object
71
-
var client =newexceptionless.ExceptionlessClient({
72
-
apiKey:'API_KEY_HERE',
73
-
serverUrl:'http://localhost:50000',
74
-
submissionBatchSize:100
75
-
});
76
-
```
73
+
var exceptionless =require('exceptionless.node');
74
+
75
+
var client =newexceptionless.ExceptionlessClient('API_KEY_HERE');
76
+
// or with a api key and server url.
77
+
var client =newexceptionless.ExceptionlessClient('API_KEY_HERE', 'http://localhost:50000');
78
+
// or with a configuration object
79
+
var client =newexceptionless.ExceptionlessClient({
80
+
apiKey:'API_KEY_HERE',
81
+
serverUrl:'http://localhost:50000',
82
+
submissionBatchSize:100
83
+
});
84
+
```
77
85
78
86
### Sending Events
79
87
Once configured, Exceptionless will automatically send any unhandled exceptions that happen in your application. The sections below will show you how to send us different event types as well as customize the data that is sent in.
0 commit comments