-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15454 from getsentry/prepare-release/9.2.0
meta: Update changelog for 9.2.0
- Loading branch information
Showing
217 changed files
with
6,304 additions
and
739 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
dev-packages/browser-integration-tests/suites/tracing/linking-addLink/init.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
integrations: [], | ||
tracesSampleRate: 1, | ||
}); |
28 changes: 28 additions & 0 deletions
28
dev-packages/browser-integration-tests/suites/tracing/linking-addLink/subject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// REGULAR --- | ||
const rootSpan1 = Sentry.startInactiveSpan({ name: 'rootSpan1' }); | ||
rootSpan1.end(); | ||
|
||
Sentry.startSpan({ name: 'rootSpan2' }, rootSpan2 => { | ||
rootSpan2.addLink({ | ||
context: rootSpan1.spanContext(), | ||
attributes: { 'sentry.link.type': 'previous_trace' }, | ||
}); | ||
}); | ||
|
||
// NESTED --- | ||
Sentry.startSpan({ name: 'rootSpan3' }, async rootSpan3 => { | ||
Sentry.startSpan({ name: 'childSpan3.1' }, async childSpan1 => { | ||
childSpan1.addLink({ | ||
context: rootSpan1.spanContext(), | ||
attributes: { 'sentry.link.type': 'previous_trace' }, | ||
}); | ||
|
||
childSpan1.end(); | ||
}); | ||
|
||
Sentry.startSpan({ name: 'childSpan3.2' }, async childSpan2 => { | ||
childSpan2.addLink({ context: rootSpan3.spanContext() }); | ||
|
||
childSpan2.end(); | ||
}); | ||
}); |
76 changes: 76 additions & 0 deletions
76
dev-packages/browser-integration-tests/suites/tracing/linking-addLink/test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import { expect } from '@playwright/test'; | ||
import type { SpanJSON, TransactionEvent } from '@sentry/core'; | ||
import { sentryTest } from '../../../utils/fixtures'; | ||
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../utils/helpers'; | ||
|
||
sentryTest('should link spans with addLink() in trace context', async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const rootSpan1Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan1'); | ||
const rootSpan2Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan2'); | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
await page.goto(url); | ||
|
||
const rootSpan1 = envelopeRequestParser<TransactionEvent>(await rootSpan1Promise); | ||
const rootSpan2 = envelopeRequestParser<TransactionEvent>(await rootSpan2Promise); | ||
|
||
const rootSpan1_traceId = rootSpan1.contexts?.trace?.trace_id as string; | ||
const rootSpan1_spanId = rootSpan1.contexts?.trace?.span_id as string; | ||
|
||
expect(rootSpan1.transaction).toBe('rootSpan1'); | ||
expect(rootSpan1.spans).toEqual([]); | ||
|
||
expect(rootSpan2.transaction).toBe('rootSpan2'); | ||
expect(rootSpan2.spans).toEqual([]); | ||
|
||
expect(rootSpan2.contexts?.trace?.links?.length).toBe(1); | ||
expect(rootSpan2.contexts?.trace?.links?.[0]).toMatchObject({ | ||
attributes: { 'sentry.link.type': 'previous_trace' }, | ||
sampled: true, | ||
span_id: rootSpan1_spanId, | ||
trace_id: rootSpan1_traceId, | ||
}); | ||
}); | ||
|
||
sentryTest('should link spans with addLink() in nested startSpan() calls', async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const rootSpan1Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan1'); | ||
const rootSpan3Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan3'); | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
await page.goto(url); | ||
|
||
const rootSpan1 = envelopeRequestParser<TransactionEvent>(await rootSpan1Promise); | ||
const rootSpan3 = envelopeRequestParser<TransactionEvent>(await rootSpan3Promise); | ||
|
||
const rootSpan1_traceId = rootSpan1.contexts?.trace?.trace_id as string; | ||
const rootSpan1_spanId = rootSpan1.contexts?.trace?.span_id as string; | ||
|
||
const [childSpan_3_1, childSpan_3_2] = rootSpan3.spans as [SpanJSON, SpanJSON]; | ||
const rootSpan3_traceId = rootSpan3.contexts?.trace?.trace_id as string; | ||
const rootSpan3_spanId = rootSpan3.contexts?.trace?.span_id as string; | ||
|
||
expect(rootSpan3.transaction).toBe('rootSpan3'); | ||
|
||
expect(childSpan_3_1.description).toBe('childSpan3.1'); | ||
expect(childSpan_3_1.links?.length).toBe(1); | ||
expect(childSpan_3_1.links?.[0]).toMatchObject({ | ||
attributes: { 'sentry.link.type': 'previous_trace' }, | ||
sampled: true, | ||
span_id: rootSpan1_spanId, | ||
trace_id: rootSpan1_traceId, | ||
}); | ||
|
||
expect(childSpan_3_2.description).toBe('childSpan3.2'); | ||
expect(childSpan_3_2.links?.[0]).toMatchObject({ | ||
sampled: true, | ||
span_id: rootSpan3_spanId, | ||
trace_id: rootSpan3_traceId, | ||
}); | ||
}); |
9 changes: 9 additions & 0 deletions
9
dev-packages/browser-integration-tests/suites/tracing/linking-addLinks/init.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
integrations: [], | ||
tracesSampleRate: 1, | ||
}); |
35 changes: 35 additions & 0 deletions
35
dev-packages/browser-integration-tests/suites/tracing/linking-addLinks/subject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// REGULAR --- | ||
const rootSpan1 = Sentry.startInactiveSpan({ name: 'rootSpan1' }); | ||
rootSpan1.end(); | ||
|
||
const rootSpan2 = Sentry.startInactiveSpan({ name: 'rootSpan2' }); | ||
rootSpan2.end(); | ||
|
||
Sentry.startSpan({ name: 'rootSpan3' }, rootSpan3 => { | ||
rootSpan3.addLinks([ | ||
{ context: rootSpan1.spanContext() }, | ||
{ | ||
context: rootSpan2.spanContext(), | ||
attributes: { 'sentry.link.type': 'previous_trace' }, | ||
}, | ||
]); | ||
}); | ||
|
||
// NESTED --- | ||
Sentry.startSpan({ name: 'rootSpan4' }, async rootSpan4 => { | ||
Sentry.startSpan({ name: 'childSpan4.1' }, async childSpan1 => { | ||
Sentry.startSpan({ name: 'childSpan4.2' }, async childSpan2 => { | ||
childSpan2.addLinks([ | ||
{ context: rootSpan4.spanContext() }, | ||
{ | ||
context: rootSpan2.spanContext(), | ||
attributes: { 'sentry.link.type': 'previous_trace' }, | ||
}, | ||
]); | ||
|
||
childSpan2.end(); | ||
}); | ||
|
||
childSpan1.end(); | ||
}); | ||
}); |
93 changes: 93 additions & 0 deletions
93
dev-packages/browser-integration-tests/suites/tracing/linking-addLinks/test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import { expect } from '@playwright/test'; | ||
import type { SpanJSON, TransactionEvent } from '@sentry/core'; | ||
import { sentryTest } from '../../../utils/fixtures'; | ||
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../utils/helpers'; | ||
|
||
sentryTest('should link spans with addLinks() in trace context', async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const rootSpan1Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan1'); | ||
const rootSpan2Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan2'); | ||
const rootSpan3Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan3'); | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
await page.goto(url); | ||
|
||
const rootSpan1 = envelopeRequestParser<TransactionEvent>(await rootSpan1Promise); | ||
const rootSpan2 = envelopeRequestParser<TransactionEvent>(await rootSpan2Promise); | ||
const rootSpan3 = envelopeRequestParser<TransactionEvent>(await rootSpan3Promise); | ||
|
||
const rootSpan1_traceId = rootSpan1.contexts?.trace?.trace_id as string; | ||
const rootSpan1_spanId = rootSpan1.contexts?.trace?.span_id as string; | ||
|
||
expect(rootSpan1.transaction).toBe('rootSpan1'); | ||
expect(rootSpan1.spans).toEqual([]); | ||
|
||
const rootSpan2_traceId = rootSpan2.contexts?.trace?.trace_id as string; | ||
const rootSpan2_spanId = rootSpan2.contexts?.trace?.span_id as string; | ||
|
||
expect(rootSpan2.transaction).toBe('rootSpan2'); | ||
expect(rootSpan2.spans).toEqual([]); | ||
|
||
expect(rootSpan3.transaction).toBe('rootSpan3'); | ||
expect(rootSpan3.spans).toEqual([]); | ||
expect(rootSpan3.contexts?.trace?.links?.length).toBe(2); | ||
expect(rootSpan3.contexts?.trace?.links).toEqual([ | ||
{ | ||
sampled: true, | ||
span_id: rootSpan1_spanId, | ||
trace_id: rootSpan1_traceId, | ||
}, | ||
{ | ||
attributes: { 'sentry.link.type': 'previous_trace' }, | ||
sampled: true, | ||
span_id: rootSpan2_spanId, | ||
trace_id: rootSpan2_traceId, | ||
}, | ||
]); | ||
}); | ||
|
||
sentryTest('should link spans with addLinks() in nested startSpan() calls', async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const rootSpan2Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan2'); | ||
const rootSpan4Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan4'); | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
await page.goto(url); | ||
|
||
const rootSpan2 = envelopeRequestParser<TransactionEvent>(await rootSpan2Promise); | ||
const rootSpan4 = envelopeRequestParser<TransactionEvent>(await rootSpan4Promise); | ||
|
||
const rootSpan2_traceId = rootSpan2.contexts?.trace?.trace_id as string; | ||
const rootSpan2_spanId = rootSpan2.contexts?.trace?.span_id as string; | ||
|
||
const [childSpan_4_1, childSpan_4_2] = rootSpan4.spans as [SpanJSON, SpanJSON]; | ||
const rootSpan4_traceId = rootSpan4.contexts?.trace?.trace_id as string; | ||
const rootSpan4_spanId = rootSpan4.contexts?.trace?.span_id as string; | ||
|
||
expect(rootSpan4.transaction).toBe('rootSpan4'); | ||
|
||
expect(childSpan_4_1.description).toBe('childSpan4.1'); | ||
expect(childSpan_4_1.links).toBe(undefined); | ||
|
||
expect(childSpan_4_2.description).toBe('childSpan4.2'); | ||
expect(childSpan_4_2.links?.length).toBe(2); | ||
expect(childSpan_4_2.links).toEqual([ | ||
{ | ||
sampled: true, | ||
span_id: rootSpan4_spanId, | ||
trace_id: rootSpan4_traceId, | ||
}, | ||
{ | ||
attributes: { 'sentry.link.type': 'previous_trace' }, | ||
sampled: true, | ||
span_id: rootSpan2_spanId, | ||
trace_id: rootSpan2_traceId, | ||
}, | ||
]); | ||
}); |
9 changes: 9 additions & 0 deletions
9
dev-packages/browser-integration-tests/suites/tracing/linking-spanOptions/init.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
integrations: [], | ||
tracesSampleRate: 1, | ||
}); |
20 changes: 20 additions & 0 deletions
20
dev-packages/browser-integration-tests/suites/tracing/linking-spanOptions/subject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const rootSpan1 = Sentry.startInactiveSpan({ name: 'rootSpan1' }); | ||
rootSpan1.end(); | ||
|
||
const rootSpan2 = Sentry.startInactiveSpan({ name: 'rootSpan2' }); | ||
rootSpan2.end(); | ||
|
||
Sentry.startSpan( | ||
{ | ||
name: 'rootSpan3', | ||
links: [ | ||
{ context: rootSpan1.spanContext() }, | ||
{ context: rootSpan2.spanContext(), attributes: { 'sentry.link.type': 'previous_trace' } }, | ||
], | ||
}, | ||
async () => { | ||
Sentry.startSpan({ name: 'childSpan3.1' }, async childSpan1 => { | ||
childSpan1.end(); | ||
}); | ||
}, | ||
); |
Oops, something went wrong.