From 05299d44853e9bb8ed609321c3859a0234b55fc2 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 27 Mar 2024 10:57:30 +0100 Subject: [PATCH 1/3] feat(v8): Remove `data` from `SentrySpan` & rename types This removes `data` from the span (there is only `attributes` left). Also, for clarity, I renamed `SpanContext` to `SentrySpanArguments`, and `TransactionContext` to `TransactionArguments`, as "Context" is heavily overloaded and IMHO this is confusing today. --- .../interactions/test.ts | 4 +- docs/v8-new-performance-apis.md | 4 +- packages/core/src/tracing/sampling.ts | 4 +- .../src/tracing/sentryNonRecordingSpan.ts | 4 +- packages/core/src/tracing/sentrySpan.ts | 68 +++---------------- packages/core/src/tracing/trace.ts | 18 ++--- packages/core/src/tracing/transaction.ts | 6 +- packages/node/test/integrations/http.test.ts | 4 +- packages/react/test/profiler.test.tsx | 6 +- packages/remix/src/client/performance.tsx | 6 +- .../src/node/integrations/mongo.ts | 2 +- packages/types/src/index.ts | 4 +- packages/types/src/span.ts | 10 +-- packages/types/src/transaction.ts | 22 +++--- packages/vue/src/router.ts | 4 +- 15 files changed, 51 insertions(+), 115 deletions(-) diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions/test.ts index a66d447d92ec..224d352ec851 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/interactions/test.ts @@ -1,6 +1,6 @@ import type { Route } from '@playwright/test'; import { expect } from '@playwright/test'; -import type { Event, SpanContext, SpanJSON } from '@sentry/types'; +import type { Contexts, Event, SpanJSON } from '@sentry/types'; import { sentryTest } from '../../../../utils/fixtures'; import { @@ -11,7 +11,7 @@ import { type TransactionJSON = SpanJSON & { spans: SpanJSON[]; - contexts: SpanContext; + contexts: Contexts; platform: string; type: string; }; diff --git a/docs/v8-new-performance-apis.md b/docs/v8-new-performance-apis.md index 713e99d5d1f1..614df1100611 100644 --- a/docs/v8-new-performance-apis.md +++ b/docs/v8-new-performance-apis.md @@ -47,10 +47,10 @@ There are three key APIs available to start spans: - `startSpanManual()` - `startInactiveSpan()` -All three span APIs take a `SpanContext` as a first argument, which has the following shape: +All three span APIs take `StartSpanOptions` as a first argument, which has the following shape: ```ts -interface SpanContext { +interface StartSpanOptions { // The only required field - the name of the span name: string; attributes?: SpanAttributes; diff --git a/packages/core/src/tracing/sampling.ts b/packages/core/src/tracing/sampling.ts index ce269e55a27d..9fa6b29aa902 100644 --- a/packages/core/src/tracing/sampling.ts +++ b/packages/core/src/tracing/sampling.ts @@ -1,4 +1,4 @@ -import type { Options, SamplingContext, TransactionContext } from '@sentry/types'; +import type { Options, SamplingContext, TransactionArguments } from '@sentry/types'; import { isNaN, logger } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; @@ -14,7 +14,7 @@ import { hasTracingEnabled } from '../utils/hasTracingEnabled'; * It returns the same transaction, for convenience. */ export function sampleTransaction( - transactionContext: TransactionContext, + transactionContext: TransactionArguments, options: Pick, samplingContext: SamplingContext, ): [sampled: boolean, sampleRate?: number] { diff --git a/packages/core/src/tracing/sentryNonRecordingSpan.ts b/packages/core/src/tracing/sentryNonRecordingSpan.ts index 6b86fe4a0fec..939812489027 100644 --- a/packages/core/src/tracing/sentryNonRecordingSpan.ts +++ b/packages/core/src/tracing/sentryNonRecordingSpan.ts @@ -1,8 +1,8 @@ import type { + SentrySpanArguments, Span, SpanAttributeValue, SpanAttributes, - SpanContext, SpanContextData, SpanStatus, SpanTimeInput, @@ -17,7 +17,7 @@ export class SentryNonRecordingSpan implements Span { private _traceId: string; private _spanId: string; - public constructor(spanContext: SpanContext = {}) { + public constructor(spanContext: SentrySpanArguments = {}) { this._traceId = spanContext.traceId || uuid4(); this._spanId = spanContext.spanId || uuid4().substring(16); } diff --git a/packages/core/src/tracing/sentrySpan.ts b/packages/core/src/tracing/sentrySpan.ts index 2eceafafa953..cc7f16102a87 100644 --- a/packages/core/src/tracing/sentrySpan.ts +++ b/packages/core/src/tracing/sentrySpan.ts @@ -1,8 +1,8 @@ import type { + SentrySpanArguments, Span, SpanAttributeValue, SpanAttributes, - SpanContext, SpanContextData, SpanJSON, SpanOrigin, @@ -32,13 +32,6 @@ import { * Span contains all data about a span */ export class SentrySpan implements Span { - /** - * Data for the span. - * @deprecated Use `spanToJSON(span).atttributes` instead. - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - public data: { [key: string]: any }; - /** * @inheritDoc * @deprecated Use top level `Sentry.getRootSpan()` instead @@ -66,12 +59,10 @@ export class SentrySpan implements Span { * @hideconstructor * @hidden */ - public constructor(spanContext: SpanContext = {}) { + public constructor(spanContext: SentrySpanArguments = {}) { this._traceId = spanContext.traceId || uuid4(); this._spanId = spanContext.spanId || uuid4().substring(16); this._startTime = spanContext.startTimestamp || timestampInSeconds(); - // eslint-disable-next-line deprecation/deprecation - this.data = spanContext.data ? { ...spanContext.data } : {}; this._attributes = {}; this.setAttributes({ @@ -164,7 +155,10 @@ export class SentrySpan implements Span { * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead. */ public startChild( - spanContext: Pick> = {}, + spanContext: Pick< + SentrySpanArguments, + Exclude + > = {}, ): Span { const childSpan = new SentrySpan({ ...spanContext, @@ -206,19 +200,6 @@ export class SentrySpan implements Span { return childSpan; } - /** - * Sets the data attribute on the current span - * @param key Data key - * @param value Data value - * @deprecated Use `setAttribute()` instead. - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - public setData(key: string, value: any): this { - // eslint-disable-next-line deprecation/deprecation - this.data = { ...this.data, [key]: value }; - return this; - } - /** @inheritdoc */ public setAttribute(key: string, value: SpanAttributeValue | undefined): void { if (value === undefined) { @@ -291,9 +272,9 @@ export class SentrySpan implements Span { * * @deprecated Use `spanToJSON()` or access the fields directly instead. */ - public toContext(): SpanContext { + public toContext(): SentrySpanArguments { return dropUndefinedKeys({ - data: this._getData(), + data: this._attributes, name: this._name, endTimestamp: this._endTime, op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP], @@ -325,7 +306,7 @@ export class SentrySpan implements Span { */ public getSpanJSON(): SpanJSON { return dropUndefinedKeys({ - data: this._getData(), + data: this._attributes, description: this._name, op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP], parent_span_id: this._parentSpanId, @@ -352,37 +333,6 @@ export class SentrySpan implements Span { return this.getSpanJSON(); } - /** - * Get the merged data for this span. - * For now, this combines `data` and `attributes` together, - * until eventually we can ingest `attributes` directly. - */ - private _getData(): - | { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [key: string]: any; - } - | undefined { - // eslint-disable-next-line deprecation/deprecation - const { data, _attributes: attributes } = this; - - const hasData = Object.keys(data).length > 0; - const hasAttributes = Object.keys(attributes).length > 0; - - if (!hasData && !hasAttributes) { - return undefined; - } - - if (hasData && hasAttributes) { - return { - ...data, - ...attributes, - }; - } - - return hasData ? data : attributes; - } - /** Emit `spanEnd` when the span is ended. */ private _onSpanEnded(): void { const client = getClient(); diff --git a/packages/core/src/tracing/trace.ts b/packages/core/src/tracing/trace.ts index e4102b610cc1..c4eb70be53b8 100644 --- a/packages/core/src/tracing/trace.ts +++ b/packages/core/src/tracing/trace.ts @@ -1,4 +1,4 @@ -import type { ClientOptions, Scope, Span, SpanTimeInput, StartSpanOptions, TransactionContext } from '@sentry/types'; +import type { ClientOptions, Scope, Span, SpanTimeInput, StartSpanOptions, TransactionArguments } from '@sentry/types'; import { propagationContextFromHeaders } from '@sentry/utils'; import type { AsyncContextStrategy } from '../asyncContext'; @@ -211,7 +211,7 @@ function createChildSpanOrTransaction({ scope, }: { parentSpan: SentrySpan | undefined; - spanContext: TransactionContext; + spanContext: TransactionArguments; forceTransaction?: boolean; scope: Scope; }): Span { @@ -275,15 +275,15 @@ function createChildSpanOrTransaction({ } /** - * This converts StartSpanOptions to TransactionContext. + * This converts StartSpanOptions to TransactionArguments. * For the most part (for now) we accept the same options, * but some of them need to be transformed. * * Eventually the StartSpanOptions will be more aligned with OpenTelemetry. */ -function normalizeContext(context: StartSpanOptions): TransactionContext { +function normalizeContext(context: StartSpanOptions): TransactionArguments { if (context.startTime) { - const ctx: TransactionContext & { startTime?: SpanTimeInput } = { ...context }; + const ctx: TransactionArguments & { startTime?: SpanTimeInput } = { ...context }; ctx.startTimestamp = spanTimeInputToSeconds(context.startTime); delete ctx.startTime; return ctx; @@ -297,7 +297,7 @@ function getAcs(): AsyncContextStrategy { return getAsyncContextStrategy(carrier); } -function _startTransaction(transactionContext: TransactionContext): Transaction { +function _startTransaction(transactionContext: TransactionArguments): Transaction { const client = getClient(); const options: Partial = (client && client.getOptions()) || {}; @@ -305,11 +305,7 @@ function _startTransaction(transactionContext: TransactionContext): Transaction name: transactionContext.name, parentSampled: transactionContext.parentSampled, transactionContext, - attributes: { - // eslint-disable-next-line deprecation/deprecation - ...transactionContext.data, - ...transactionContext.attributes, - }, + attributes: transactionContext.attributes, }); // eslint-disable-next-line deprecation/deprecation diff --git a/packages/core/src/tracing/transaction.ts b/packages/core/src/tracing/transaction.ts index 2469594ad687..ae1676694c34 100644 --- a/packages/core/src/tracing/transaction.ts +++ b/packages/core/src/tracing/transaction.ts @@ -8,7 +8,7 @@ import type { SpanJSON, SpanTimeInput, Transaction as TransactionInterface, - TransactionContext, + TransactionArguments, TransactionEvent, TransactionMetadata, TransactionSource, @@ -52,7 +52,7 @@ export class Transaction extends SentrySpan implements TransactionInterface { * * @deprecated Transactions will be removed in v8. Use spans instead. */ - public constructor(transactionContext: TransactionContext, hub?: Hub) { + public constructor(transactionContext: TransactionArguments, hub?: Hub) { super(transactionContext); this._measurements = {}; this._contexts = {}; @@ -170,7 +170,7 @@ export class Transaction extends SentrySpan implements TransactionInterface { /** * @inheritDoc */ - public toContext(): TransactionContext { + public toContext(): TransactionArguments { // eslint-disable-next-line deprecation/deprecation const spanContext = super.toContext(); diff --git a/packages/node/test/integrations/http.test.ts b/packages/node/test/integrations/http.test.ts index df206904b48f..f503d3dca8d0 100644 --- a/packages/node/test/integrations/http.test.ts +++ b/packages/node/test/integrations/http.test.ts @@ -5,7 +5,7 @@ import { getCurrentHub, getIsolationScope, setCurrentClient } from '@sentry/core import { Transaction } from '@sentry/core'; import { getCurrentScope, setUser, spanToJSON, startInactiveSpan } from '@sentry/core'; import { addTracingExtensions } from '@sentry/core'; -import type { TransactionContext } from '@sentry/types'; +import type { TransactionArguments } from '@sentry/types'; import { TRACEPARENT_REGEXP } from '@sentry/utils'; import * as nock from 'nock'; import { HttpsProxyAgent } from '../../src/proxy'; @@ -38,7 +38,7 @@ describe('tracing', () => { function createTransactionOnScope( customOptions: Partial = {}, - customContext?: Partial, + customContext?: Partial, ) { setupMockHub(customOptions); addTracingExtensions(); diff --git a/packages/react/test/profiler.test.tsx b/packages/react/test/profiler.test.tsx index 9f8b23063e00..07f34d526915 100644 --- a/packages/react/test/profiler.test.tsx +++ b/packages/react/test/profiler.test.tsx @@ -1,5 +1,5 @@ import { SentrySpan } from '@sentry/core'; -import type { SpanContext } from '@sentry/types'; +import type { StartSpanOptions } from '@sentry/types'; import { render } from '@testing-library/react'; import { renderHook } from '@testing-library/react-hooks'; // biome-ignore lint/nursery/noUnusedImports: Need React import for JSX @@ -8,7 +8,7 @@ import * as React from 'react'; import { REACT_MOUNT_OP, REACT_RENDER_OP, REACT_UPDATE_OP } from '../src/constants'; import { UNKNOWN_COMPONENT, useProfiler, withProfiler } from '../src/profiler'; -const mockStartInactiveSpan = jest.fn((spanArgs: SpanContext) => ({ ...spanArgs })); +const mockStartInactiveSpan = jest.fn((spanArgs: StartSpanOptions) => ({ ...spanArgs })); const mockFinish = jest.fn(); class MockSpan extends SentrySpan { @@ -22,7 +22,7 @@ let activeSpan: Record; jest.mock('@sentry/browser', () => ({ ...jest.requireActual('@sentry/browser'), getActiveSpan: () => activeSpan, - startInactiveSpan: (ctx: SpanContext) => { + startInactiveSpan: (ctx: StartSpanOptions) => { mockStartInactiveSpan(ctx); return new MockSpan(ctx); }, diff --git a/packages/remix/src/client/performance.tsx b/packages/remix/src/client/performance.tsx index f50bd5ac2a0e..ea91b816b91a 100644 --- a/packages/remix/src/client/performance.tsx +++ b/packages/remix/src/client/performance.tsx @@ -13,7 +13,7 @@ import { startBrowserTracingPageLoadSpan, withErrorBoundary, } from '@sentry/react'; -import type { Span, StartSpanOptions, TransactionContext } from '@sentry/types'; +import type { Span, StartSpanOptions, TransactionArguments } from '@sentry/types'; import { isNodeEnv, logger } from '@sentry/utils'; import * as React from 'react'; @@ -52,7 +52,7 @@ let _useEffect: UseEffect | undefined; let _useLocation: UseLocation | undefined; let _useMatches: UseMatches | undefined; -let _customStartTransaction: ((context: TransactionContext) => Span | undefined) | undefined; +let _customStartTransaction: ((context: TransactionArguments) => Span | undefined) | undefined; let _instrumentNavigation: boolean | undefined; function getInitPathName(): string | undefined { @@ -220,7 +220,7 @@ export function setGlobals({ useLocation?: UseLocation; useMatches?: UseMatches; instrumentNavigation?: boolean; - customStartTransaction?: (context: TransactionContext) => Span | undefined; + customStartTransaction?: (context: TransactionArguments) => Span | undefined; }): void { _useEffect = useEffect; _useLocation = useLocation; diff --git a/packages/tracing-internal/src/node/integrations/mongo.ts b/packages/tracing-internal/src/node/integrations/mongo.ts index b85e0f3ae03a..3cfd0fc9459e 100644 --- a/packages/tracing-internal/src/node/integrations/mongo.ts +++ b/packages/tracing-internal/src/node/integrations/mongo.ts @@ -219,7 +219,7 @@ export class Mongo implements LazyLoadedIntegration { } /** - * Form a SpanContext based on the user input to a given operation. + * Form a SentrySpanArguments based on the user input to a given operation. */ private _getSpanContextFromOperationArguments( collection: MongoCollection, diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 9b8009de4fc4..871f41b82625 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -90,7 +90,7 @@ export type { export type { SeverityLevel } from './severity'; export type { Span, - SpanContext, + SentrySpanArguments, SpanOrigin, SpanAttributeValue, SpanAttributes, @@ -110,7 +110,7 @@ export type { SamplingContext, TraceparentData, Transaction, - TransactionContext, + TransactionArguments, TransactionMetadata, TransactionSource, } from './transaction'; diff --git a/packages/types/src/span.ts b/packages/types/src/span.ts index 76b8ba18fcdc..2293dba65eda 100644 --- a/packages/types/src/span.ts +++ b/packages/types/src/span.ts @@ -116,7 +116,7 @@ export interface SpanContextData { spanId: string; /** - * Only true if the SpanContext was propagated from a remote parent. + * Only true if the SentrySpanArguments was propagated from a remote parent. */ isRemote?: boolean | undefined; @@ -138,7 +138,7 @@ export interface SpanContextData { * Interface holding all properties that can be set on a Span on creation. * This is only used for the legacy span/transaction creation and will go away in v8. */ -export interface SpanContext { +export interface SentrySpanArguments { /** * Human-readable identifier for the span. */ @@ -169,12 +169,6 @@ export interface SpanContext { */ traceId?: string | undefined; - /** - * Data of the Span. - * @deprecated Pass `attributes` instead. - */ - data?: { [key: string]: any }; - /** * Attributes of the Span. */ diff --git a/packages/types/src/transaction.ts b/packages/types/src/transaction.ts index a5ebe5d29ecb..c01106623705 100644 --- a/packages/types/src/transaction.ts +++ b/packages/types/src/transaction.ts @@ -3,12 +3,12 @@ import type { DynamicSamplingContext } from './envelope'; import type { MeasurementUnit } from './measurement'; import type { ExtractedNodeRequestData, WorkerLocation } from './misc'; import type { PolymorphicRequest } from './polymorphics'; -import type { Span, SpanAttributes, SpanContext } from './span'; +import type { SentrySpanArguments, Span, SpanAttributes } from './span'; /** * Interface holding Transaction-specific properties */ -export interface TransactionContext extends SpanContext { +export interface TransactionArguments extends SentrySpanArguments { /** * Human-readable identifier for the transaction */ @@ -57,18 +57,12 @@ export interface TraceparentData { /** * Transaction "Class", inherits Span only has `setName` */ -export interface Transaction extends Omit, Span { +export interface Transaction extends Omit, Span { /** * @inheritDoc */ startTimestamp: number; - /** - * Data for the transaction. - * @deprecated Use `getSpanAttributes(transaction)` instead. - */ - data: { [key: string]: any }; - /** * Attributes for the transaction. * @deprecated Use `getSpanAttributes(transaction)` instead. @@ -99,10 +93,10 @@ export interface Transaction extends Omit>): Span; + startChild( + spanContext?: Pick>, + ): Span; } /** @@ -142,7 +138,7 @@ export interface SamplingContext extends CustomSamplingContext { /** * Context data with which transaction being sampled was created */ - transactionContext: TransactionContext; + transactionContext: TransactionArguments; /** * Sampling decision from the parent transaction, if any. diff --git a/packages/vue/src/router.ts b/packages/vue/src/router.ts index 9d8e04bf75b2..8edb6eefd640 100644 --- a/packages/vue/src/router.ts +++ b/packages/vue/src/router.ts @@ -6,7 +6,7 @@ import { getRootSpan, spanToJSON, } from '@sentry/core'; -import type { Span, SpanAttributes, TransactionContext, TransactionSource } from '@sentry/types'; +import type { Span, SpanAttributes, TransactionArguments, TransactionSource } from '@sentry/types'; // The following type is an intersection of the Route type from VueRouter v2, v3, and v4. // This is not great, but kinda necessary to make it work with all versions at the same time. @@ -47,7 +47,7 @@ export function instrumentVueRouter( instrumentPageLoad: boolean; instrumentNavigation: boolean; }, - startNavigationSpanFn: (context: TransactionContext) => void, + startNavigationSpanFn: (context: TransactionArguments) => void, ): void { router.onError(error => captureException(error, { mechanism: { handled: false } })); From bf49286742047562c491016ca6d9fef6149d2e76 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 27 Mar 2024 12:15:08 +0100 Subject: [PATCH 2/3] remove leftovers... --- .../startSpan/circular_data/subject.js | 2 +- .../core/test/lib/tracing/sentrySpan.test.ts | 64 ------------------- 2 files changed, 1 insertion(+), 65 deletions(-) diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/subject.js b/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/subject.js index baa6bd3d2361..59b13fbf123b 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/subject.js +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/subject.js @@ -3,5 +3,5 @@ const egg = { contains: chicken }; chicken.lays = egg; Sentry.startSpan({ name: 'circular_object_test_transaction', data: { chicken } }, () => { - Sentry.startSpan({ op: 'circular_object_test_span', data: { chicken } }, () => undefined); + Sentry.startSpan({ op: 'circular_object_test_span', attributes: { chicken } }, () => undefined); }); diff --git a/packages/core/test/lib/tracing/sentrySpan.test.ts b/packages/core/test/lib/tracing/sentrySpan.test.ts index e7a971d0bdcf..cedf1d216eff 100644 --- a/packages/core/test/lib/tracing/sentrySpan.test.ts +++ b/packages/core/test/lib/tracing/sentrySpan.test.ts @@ -351,68 +351,4 @@ describe('SentrySpan', () => { }); }); }); - - // Ensure that attributes & data are merged together - describe('_getData', () => { - it('works without data & attributes', () => { - const span = new SentrySpan(); - - expect(span['_getData']()).toEqual({ - // origin is set by default to 'manual' in the SentrySpan constructor - 'sentry.origin': 'manual', - }); - }); - - it('works with data only', () => { - const span = new SentrySpan(); - // eslint-disable-next-line deprecation/deprecation - span.setData('foo', 'bar'); - - expect(span['_getData']()).toEqual({ - foo: 'bar', - // origin is set by default to 'manual' in the SentrySpan constructor - 'sentry.origin': 'manual', - }); - expect(span['_getData']()).toStrictEqual({ - // eslint-disable-next-line deprecation/deprecation - ...span.data, - 'sentry.origin': 'manual', - }); - }); - - it('works with attributes only', () => { - const span = new SentrySpan(); - span.setAttribute('foo', 'bar'); - - expect(span['_getData']()).toEqual({ - foo: 'bar', - // origin is set by default to 'manual' in the SentrySpan constructor - 'sentry.origin': 'manual', - }); - // eslint-disable-next-line deprecation/deprecation - expect(span['_getData']()).toBe(span.attributes); - }); - - it('merges data & attributes', () => { - const span = new SentrySpan(); - span.setAttribute('foo', 'foo'); - span.setAttribute('bar', 'bar'); - // eslint-disable-next-line deprecation/deprecation - span.setData('foo', 'foo2'); - // eslint-disable-next-line deprecation/deprecation - span.setData('baz', 'baz'); - - expect(span['_getData']()).toEqual({ - foo: 'foo', - bar: 'bar', - baz: 'baz', - // origin is set by default to 'manual' in the SentrySpan constructor - 'sentry.origin': 'manual', - }); - // eslint-disable-next-line deprecation/deprecation - expect(span['_getData']()).not.toBe(span.attributes); - // eslint-disable-next-line deprecation/deprecation - expect(span['_getData']()).not.toBe(span.data); - }); - }); }); From c0b8b65fb90e68721ce3ec614663703679b94b9a Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 27 Mar 2024 12:33:29 +0100 Subject: [PATCH 3/3] fix test --- .../suites/public-api/startSpan/circular_data/subject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/subject.js b/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/subject.js index 59b13fbf123b..b5ee8624b124 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/subject.js +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/circular_data/subject.js @@ -2,6 +2,6 @@ const chicken = {}; const egg = { contains: chicken }; chicken.lays = egg; -Sentry.startSpan({ name: 'circular_object_test_transaction', data: { chicken } }, () => { +Sentry.startSpan({ name: 'circular_object_test_transaction', attributes: { chicken } }, () => { Sentry.startSpan({ op: 'circular_object_test_span', attributes: { chicken } }, () => undefined); });