Skip to content

Commit 9e5e59a

Browse files
committed
add tracing.replay.logs.metrics
1 parent 1117b46 commit 9e5e59a

File tree

7 files changed

+81
-0
lines changed

7 files changed

+81
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ jobs:
571571
- bundle_logs_metrics
572572
- bundle_tracing_logs_metrics
573573
- bundle_tracing_replay
574+
- bundle_tracing_replay_logs_metrics
574575
- bundle_tracing_replay_feedback
575576
- bundle_tracing_replay_feedback_min
576577
- bundle_tracing_replay_feedback_logs_metrics

.size-limit.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@ module.exports = [
204204
gzip: true,
205205
limit: '80 KB',
206206
},
207+
{
208+
name: 'CDN Bundle (incl. Tracing, Replay, Logs, Metrics)',
209+
path: createCDNPath('bundle.tracing.replay.logs.metrics.min.js'),
210+
gzip: true,
211+
limit: '81 KB',
212+
},
207213
{
208214
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
209215
path: createCDNPath('bundle.tracing.replay.feedback.min.js'),
@@ -252,6 +258,13 @@ module.exports = [
252258
brotli: false,
253259
limit: '245 KB',
254260
},
261+
{
262+
name: 'CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed',
263+
path: createCDNPath('bundle.tracing.replay.logs.metrics.min.js'),
264+
gzip: false,
265+
brotli: false,
266+
limit: '250 KB',
267+
},
255268
{
256269
name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed',
257270
path: createCDNPath('bundle.tracing.replay.feedback.min.js'),

dev-packages/browser-integration-tests/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
"test:bundle:tracing_logs_metrics": "PW_BUNDLE=bundle_tracing_logs_metrics yarn test",
3030
"test:bundle:tracing_logs_metrics:min": "PW_BUNDLE=bundle_tracing_logs_metrics_min yarn test",
3131
"test:bundle:tracing_logs_metrics:debug_min": "PW_BUNDLE=bundle_tracing_logs_metrics_debug_min yarn test",
32+
"test:bundle:tracing_replay_logs_metrics": "PW_BUNDLE=bundle_tracing_replay_logs_metrics yarn test",
33+
"test:bundle:tracing_replay_logs_metrics:min": "PW_BUNDLE=bundle_tracing_replay_logs_metrics_min yarn test",
34+
"test:bundle:tracing_replay_logs_metrics:debug_min": "PW_BUNDLE=bundle_tracing_replay_logs_metrics_debug_min yarn test",
3235
"test:bundle:full": "PW_BUNDLE=bundle_tracing_replay_feedback yarn test",
3336
"test:bundle:full:min": "PW_BUNDLE=bundle_tracing_replay_feedback_min yarn test",
3437
"test:bundle:tracing_replay_feedback_logs_metrics": "PW_BUNDLE=bundle_tracing_replay_feedback_logs_metrics yarn test",

dev-packages/browser-integration-tests/utils/generatePlugin.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ const BUNDLE_PATHS: Record<string, Record<string, string>> = {
6464
bundle_tracing_logs_metrics_debug_min: 'build/bundles/bundle.tracing.logs.metrics.debug.min.js',
6565
bundle_tracing_replay: 'build/bundles/bundle.tracing.replay.js',
6666
bundle_tracing_replay_min: 'build/bundles/bundle.tracing.replay.min.js',
67+
bundle_tracing_replay_logs_metrics: 'build/bundles/bundle.tracing.replay.logs.metrics.js',
68+
bundle_tracing_replay_logs_metrics_min: 'build/bundles/bundle.tracing.replay.logs.metrics.min.js',
69+
bundle_tracing_replay_logs_metrics_debug_min: 'build/bundles/bundle.tracing.replay.logs.metrics.debug.min.js',
6770
bundle_tracing_replay_feedback: 'build/bundles/bundle.tracing.replay.feedback.js',
6871
bundle_tracing_replay_feedback_min: 'build/bundles/bundle.tracing.replay.feedback.min.js',
6972
bundle_tracing_replay_feedback_logs_metrics: 'build/bundles/bundle.tracing.replay.feedback.logs.metrics.js',

packages/browser/rollup.bundle.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ const tracingLogsMetricsBaseBundleConfig = makeBaseBundleConfig({
118118
outputFileBase: () => 'bundles/bundle.tracing.logs.metrics',
119119
});
120120

121+
const tracingReplayLogsMetricsBaseBundleConfig = makeBaseBundleConfig({
122+
bundleType: 'standalone',
123+
entrypoints: ['src/index.bundle.tracing.replay.logs.metrics.ts'],
124+
licenseTitle: '@sentry/browser (Performance Monitoring, Replay, Logs, and Metrics)',
125+
outputFileBase: () => 'bundles/bundle.tracing.replay.logs.metrics',
126+
});
127+
121128
const tracingReplayFeedbackLogsMetricsBaseBundleConfig = makeBaseBundleConfig({
122129
bundleType: 'standalone',
123130
entrypoints: ['src/index.bundle.tracing.replay.feedback.logs.metrics.ts'],
@@ -135,6 +142,7 @@ builds.push(
135142
...makeBundleConfigVariants(tracingReplayFeedbackBaseBundleConfig),
136143
...makeBundleConfigVariants(logsMetricsBaseBundleConfig),
137144
...makeBundleConfigVariants(tracingLogsMetricsBaseBundleConfig),
145+
...makeBundleConfigVariants(tracingReplayLogsMetricsBaseBundleConfig),
138146
...makeBundleConfigVariants(tracingReplayFeedbackLogsMetricsBaseBundleConfig),
139147
);
140148

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { registerSpanErrorInstrumentation } from '@sentry/core';
2+
import { feedbackIntegrationShim } from '@sentry-internal/integration-shims';
3+
4+
registerSpanErrorInstrumentation();
5+
6+
export * from './index.bundle.base';
7+
8+
// TODO(v11): Export metrics here once we remove it from the base bundle.
9+
export { logger, consoleLoggingIntegration } from '@sentry/core';
10+
11+
export {
12+
getActiveSpan,
13+
getRootSpan,
14+
getSpanDescendants,
15+
setMeasurement,
16+
startInactiveSpan,
17+
startNewTrace,
18+
startSpan,
19+
startSpanManual,
20+
withActiveSpan,
21+
} from '@sentry/core';
22+
23+
export {
24+
browserTracingIntegration,
25+
startBrowserTracingNavigationSpan,
26+
startBrowserTracingPageLoadSpan,
27+
} from './tracing/browserTracingIntegration';
28+
export { reportPageLoaded } from './tracing/reportPageLoaded';
29+
export { setActiveSpanInBrowser } from './tracing/setActiveSpan';
30+
31+
export {
32+
feedbackIntegrationShim as feedbackAsyncIntegration,
33+
feedbackIntegrationShim as feedbackIntegration,
34+
};
35+
36+
export { replayIntegration, getReplay } from '@sentry-internal/replay';
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { logger as coreLogger, metrics as coreMetrics } from '@sentry/core';
2+
import { feedbackIntegrationShim } from '@sentry-internal/integration-shims';
3+
import { describe, expect, it } from 'vitest';
4+
import { browserTracingIntegration, replayIntegration } from '../src';
5+
import * as TracingReplayLogsMetricsBundle from '../src/index.bundle.tracing.replay.logs.metrics';
6+
7+
describe('index.bundle.tracing.replay.logs.metrics', () => {
8+
it('has correct exports', () => {
9+
expect(TracingReplayLogsMetricsBundle.browserTracingIntegration).toBe(browserTracingIntegration);
10+
expect(TracingReplayLogsMetricsBundle.feedbackAsyncIntegration).toBe(feedbackIntegrationShim);
11+
expect(TracingReplayLogsMetricsBundle.feedbackIntegration).toBe(feedbackIntegrationShim);
12+
expect(TracingReplayLogsMetricsBundle.replayIntegration).toBe(replayIntegration);
13+
14+
expect(TracingReplayLogsMetricsBundle.logger).toBe(coreLogger);
15+
expect(TracingReplayLogsMetricsBundle.metrics).toBe(coreMetrics);
16+
});
17+
});

0 commit comments

Comments
 (0)