1 | import * as tslib_1 from "tslib";
|
2 | import { BaseClient } from '@sentry/core';
|
3 | import { NodeBackend } from './backend';
|
4 | import { SDK_NAME, SDK_VERSION } from './version';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | var NodeClient = (function (_super) {
|
12 | tslib_1.__extends(NodeClient, _super);
|
13 | |
14 |
|
15 |
|
16 |
|
17 | function NodeClient(options) {
|
18 | return _super.call(this, NodeBackend, options) || this;
|
19 | }
|
20 | |
21 |
|
22 |
|
23 | NodeClient.prototype._prepareEvent = function (event, scope, hint) {
|
24 | event.platform = event.platform || 'node';
|
25 | event.sdk = tslib_1.__assign({}, event.sdk, { name: SDK_NAME, packages: tslib_1.__spread(((event.sdk && event.sdk.packages) || []), [
|
26 | {
|
27 | name: 'npm:@sentry/node',
|
28 | version: SDK_VERSION,
|
29 | },
|
30 | ]), version: SDK_VERSION });
|
31 | if (this.getOptions().serverName) {
|
32 | event.server_name = this.getOptions().serverName;
|
33 | }
|
34 | return _super.prototype._prepareEvent.call(this, event, scope, hint);
|
35 | };
|
36 | return NodeClient;
|
37 | }(BaseClient));
|
38 | export { NodeClient };
|
39 |
|
\ | No newline at end of file |