Skip to content

Commit fe94026

Browse files
mydeabillyvg
authored andcommitted
ci(node): Add size limit entry for node without performance (#12342)
You can initialize the Node SDK like this: ```js import * as Node from '@sentry/node'; Sentry.initWithoutDefaultIntegrations({ dsn: '...', integrations: [...Sentry.getDefaultIntegrationsWithoutPerformance()] }); ``` Which can be used to tree shake all the otel performance instrumentation (except for http) away. Also adjusts the size limits to be the current values + ~15kb.
1 parent e624804 commit fe94026

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.size-limit.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,24 @@ module.exports = [
211211
import: createImport('init'),
212212
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
213213
gzip: true,
214-
limit: '180 KB',
214+
limit: '130 KB',
215+
},
216+
{
217+
name: '@sentry/node - without tracing',
218+
path: 'packages/node/build/esm/index.js',
219+
import: createImport('initWithoutDefaultIntegrations', 'getDefaultIntegrationsWithoutPerformance'),
220+
gzip: true,
221+
limit: '110 KB',
222+
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
223+
modifyWebpackConfig: function (config) {
224+
const webpack = require('webpack');
225+
config.plugins.push(
226+
new webpack.DefinePlugin({
227+
__SENTRY_TRACING__: false,
228+
}),
229+
);
230+
return config;
231+
},
215232
},
216233
// AWS SDK (ESM)
217234
{
@@ -220,7 +237,7 @@ module.exports = [
220237
import: createImport('init'),
221238
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
222239
gzip: true,
223-
limit: '140 KB',
240+
limit: '120 KB',
224241
},
225242
];
226243

0 commit comments

Comments
 (0)