Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ module.exports = [
gzip: true,
limit: '42.5 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Logs, Metrics)',
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
gzip: true,
limit: '45 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay)',
path: createCDNPath('bundle.tracing.replay.min.js'),
Expand Down Expand Up @@ -213,6 +219,13 @@ module.exports = [
brotli: false,
limit: '127 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed',
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
gzip: false,
brotli: false,
limit: '140 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',
path: createCDNPath('bundle.tracing.replay.min.js'),
Expand Down
8 changes: 8 additions & 0 deletions packages/browser/rollup.bundle.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ const tracingReplayFeedbackBaseBundleConfig = makeBaseBundleConfig({
outputFileBase: () => 'bundles/bundle.tracing.replay.feedback',
});

const tracingLogsMetricsBaseBundleConfig = makeBaseBundleConfig({
bundleType: 'standalone',
entrypoints: ['src/index.bundle.tracing.logs.metrics.ts'],
licenseTitle: '@sentry/browser (Performance Monitoring, Logs, and Metrics)',
outputFileBase: () => 'bundles/bundle.tracing.logs.metrics',
});

builds.push(
...makeBundleConfigVariants(baseBundleConfig),
...makeBundleConfigVariants(tracingBaseBundleConfig),
Expand All @@ -112,6 +119,7 @@ builds.push(
...makeBundleConfigVariants(tracingReplayBaseBundleConfig),
...makeBundleConfigVariants(replayFeedbackBaseBundleConfig),
...makeBundleConfigVariants(tracingReplayFeedbackBaseBundleConfig),
...makeBundleConfigVariants(tracingLogsMetricsBaseBundleConfig),
);

export default builds;
35 changes: 35 additions & 0 deletions packages/browser/src/index.bundle.tracing.logs.metrics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { registerSpanErrorInstrumentation } from '@sentry/core';
import { feedbackIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims';

registerSpanErrorInstrumentation();

export * from './index.bundle.base';

// TODO(v11): Export metrics here once we remove it from the base bundle.
export { logger } from '@sentry/core';

export {
getActiveSpan,
getRootSpan,
getSpanDescendants,
setMeasurement,
startInactiveSpan,
startNewTrace,
startSpan,
startSpanManual,
withActiveSpan,
} from '@sentry/core';

export {
browserTracingIntegration,
startBrowserTracingNavigationSpan,
startBrowserTracingPageLoadSpan,
} from './tracing/browserTracingIntegration';
export { reportPageLoaded } from './tracing/reportPageLoaded';
export { setActiveSpanInBrowser } from './tracing/setActiveSpan';

export {
feedbackIntegrationShim as feedbackAsyncIntegration,
feedbackIntegrationShim as feedbackIntegration,
replayIntegrationShim as replayIntegration,
};
19 changes: 19 additions & 0 deletions packages/browser/test/index.bundle.tracing.logs.metrics.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { logger as coreLogger, metrics as coreMetrics } from '@sentry/core';
import { feedbackIntegrationShim, replayIntegrationShim } from '@sentry-internal/integration-shims';
import { describe, expect, it } from 'vitest';
import { browserTracingIntegration } from '../src';
import * as TracingLogsMetricsBundle from '../src/index.bundle.tracing.logs.metrics';

describe('index.bundle.tracing.logs.metrics', () => {
it('has correct exports', () => {
expect(TracingLogsMetricsBundle.browserTracingIntegration).toBe(browserTracingIntegration);
expect(TracingLogsMetricsBundle.feedbackAsyncIntegration).toBe(feedbackIntegrationShim);
expect(TracingLogsMetricsBundle.feedbackIntegration).toBe(feedbackIntegrationShim);
expect(TracingLogsMetricsBundle.replayIntegration).toBe(replayIntegrationShim);

expect(TracingLogsMetricsBundle.logger).toBe(coreLogger);
expect(TracingLogsMetricsBundle.metrics).toBe(coreMetrics);
});
});


Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
Loading