File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ export function fetchCallback(
160160 shouldAttachHeaders: (url: string) => boolean,
161161 spans: Record<string, Span>,
162162): void {
163+ console.log(2);
163164 if (!hasTracingEnabled() || !(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) {
164165 return;
165166 }
@@ -294,6 +295,7 @@ export function xhrCallback(
294295 shouldAttachHeaders: (url: string) => boolean,
295296 spans: Record<string, Span>,
296297): void {
298+ console.log(1);
297299 if (
298300 !hasTracingEnabled() ||
299301 (handlerData.xhr && handlerData.xhr.__sentry_own_request__) ||
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import type {
1212 TransactionMetadata,
1313} from '@sentry/types';
1414import { dropUndefinedKeys, logger } from '@sentry/utils';
15-
15+ import { Replay } from '@sentry/replay';
1616import { Span as SpanClass, SpanRecorder } from './span';
1717
1818/** JSDoc */
@@ -236,6 +236,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
236236 * @experimental
237237 */
238238 public getDynamicSamplingContext(): Readonly<Partial<DynamicSamplingContext>> {
239+ console.log('dsc');
239240 if (this._frozenDynamicSamplingContext) {
240241 return this._frozenDynamicSamplingContext;
241242 }
@@ -256,6 +257,12 @@ export class Transaction extends SpanClass implements TransactionInterface {
256257
257258 const source = this.metadata.source;
258259
260+ const replay = client.getIntegration(Replay);
261+
262+ console.log(replay);
263+ // @ts-ignore
264+ const replayId = replay?._replay.session.id;
265+
259266 // We don't want to have a transaction name in the DSC if the source is "url" because URLs might contain PII
260267 const transaction = source && source !== 'url' ? this.name : undefined;
261268
@@ -267,6 +274,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
267274 public_key,
268275 trace_id: this.traceId,
269276 sample_rate,
277+ replayId,
270278 });
271279
272280 // Uncomment if we want to make DSC immutable
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ function instrument(type: InstrumentHandlerType): void {
4848
4949 switch (type) {
5050 case 'console':
51- instrumentConsole();
51+ // instrumentConsole();
5252 break;
5353 case 'dom':
5454 instrumentDOM();
You can’t perform that action at this time.
0 commit comments