Skip to content

Commit 9ad6fb8

Browse files
fix(appStart): Align span description with other platforms (#4636)
1 parent 380b389 commit 9ad6fb8

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828

2929
To learn more about the available configuration options visit [the documentation](https://docs.sentry.io/platforms/react-native/manual-setup/expo/expo-sagp/).
3030

31+
### Changes
32+
33+
Change `Cold/Warm App Start` span description to `Cold/Warm Start` ([#4636](https://github.com/getsentry/sentry-react-native/pull/4636))
34+
3135
### Fixes
3236

3337
- Various crashes and issues of Session Replay on Android. See the Android SDK version bump for more details. ([#4529](https://github.com/getsentry/sentry-react-native/pull/4529))

packages/core/src/js/tracing/integrations/appStart.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export const appStartIntegration = ({
295295
const op = appStart.type === 'cold' ? APP_START_COLD_OP : APP_START_WARM_OP;
296296
const appStartSpanJSON: SpanJSON = createSpanJSON({
297297
op,
298-
description: appStart.type === 'cold' ? 'Cold App Start' : 'Warm App Start',
298+
description: appStart.type === 'cold' ? 'Cold Start' : 'Warm Start',
299299
start_timestamp: appStartTimestampSeconds,
300300
timestamp: appStartEndTimestampSeconds,
301301
trace_id: event.contexts.trace.trace_id,

packages/core/test/tracing/integrations/appStart.test.ts

+18-18
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ describe('App Start Integration', () => {
151151

152152
const actualEvent = await captureStandAloneAppStart();
153153

154-
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold App Start');
154+
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold Start');
155155
const bundleStartSpan = actualEvent!.spans!.find(
156156
({ description }) => description === 'JS Bundle Execution Start',
157157
);
158158

159159
expect(appStartRootSpan).toEqual(
160160
expect.objectContaining(<Partial<SpanJSON>>{
161161
span_id: expect.any(String),
162-
description: 'Cold App Start',
162+
description: 'Cold Start',
163163
op: APP_START_COLD_OP,
164164
data: {
165165
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: APP_START_COLD_OP,
@@ -189,15 +189,15 @@ describe('App Start Integration', () => {
189189

190190
const actualEvent = await captureStandAloneAppStart();
191191

192-
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold App Start');
192+
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold Start');
193193
const bundleStartSpan = actualEvent!.spans!.find(
194194
({ description }) => description === 'JS Bundle Execution Before React Root',
195195
);
196196

197197
expect(appStartRootSpan).toEqual(
198198
expect.objectContaining(<Partial<SpanJSON>>{
199199
span_id: expect.any(String),
200-
description: 'Cold App Start',
200+
description: 'Cold Start',
201201
op: APP_START_COLD_OP,
202202
data: {
203203
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: APP_START_COLD_OP,
@@ -228,13 +228,13 @@ describe('App Start Integration', () => {
228228

229229
const actualEvent = await captureStandAloneAppStart();
230230

231-
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold App Start');
231+
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold Start');
232232
const nativeSpan = actualEvent!.spans!.find(({ description }) => description === 'test native app start span');
233233

234234
expect(appStartRootSpan).toEqual(
235235
expect.objectContaining(<Partial<SpanJSON>>{
236236
span_id: expect.any(String),
237-
description: 'Cold App Start',
237+
description: 'Cold Start',
238238
op: APP_START_COLD_OP,
239239
data: {
240240
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: APP_START_COLD_OP,
@@ -465,14 +465,14 @@ describe('App Start Integration', () => {
465465

466466
const actualEvent = await processEvent(getMinimalTransactionEvent());
467467

468-
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold App Start');
468+
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold Start');
469469
const bundleStartSpan = actualEvent!.spans!.find(
470470
({ description }) => description === 'JS Bundle Execution Start',
471471
);
472472

473473
expect(appStartRootSpan).toEqual(
474474
expect.objectContaining(<Partial<SpanJSON>>{
475-
description: 'Cold App Start',
475+
description: 'Cold Start',
476476
span_id: expect.any(String),
477477
op: APP_START_COLD_OP,
478478
origin: SPAN_ORIGIN_AUTO_APP_START,
@@ -505,14 +505,14 @@ describe('App Start Integration', () => {
505505

506506
const actualEvent = await processEvent(getMinimalTransactionEvent());
507507

508-
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold App Start');
508+
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold Start');
509509
const bundleStartSpan = actualEvent!.spans!.find(
510510
({ description }) => description === 'JS Bundle Execution Before React Root',
511511
);
512512

513513
expect(appStartRootSpan).toEqual(
514514
expect.objectContaining(<Partial<SpanJSON>>{
515-
description: 'Cold App Start',
515+
description: 'Cold Start',
516516
span_id: expect.any(String),
517517
op: APP_START_COLD_OP,
518518
origin: SPAN_ORIGIN_AUTO_APP_START,
@@ -545,14 +545,14 @@ describe('App Start Integration', () => {
545545

546546
const actualEvent = await processEvent(getMinimalTransactionEvent());
547547

548-
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold App Start');
548+
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold Start');
549549
const bundleStartSpan = actualEvent!.spans!.find(
550550
({ description }) => description === 'JS Bundle Execution Before React Root',
551551
);
552552

553553
expect(appStartRootSpan).toEqual(
554554
expect.objectContaining(<Partial<SpanJSON>>{
555-
description: 'Cold App Start',
555+
description: 'Cold Start',
556556
span_id: expect.any(String),
557557
op: APP_START_COLD_OP,
558558
origin: SPAN_ORIGIN_AUTO_APP_START,
@@ -586,12 +586,12 @@ describe('App Start Integration', () => {
586586

587587
const actualEvent = await processEvent(getMinimalTransactionEvent());
588588

589-
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold App Start');
589+
const appStartRootSpan = actualEvent!.spans!.find(({ description }) => description === 'Cold Start');
590590
const nativeSpan = actualEvent!.spans!.find(({ description }) => description === 'test native app start span');
591591

592592
expect(appStartRootSpan).toEqual(
593593
expect.objectContaining(<Partial<SpanJSON>>{
594-
description: 'Cold App Start',
594+
description: 'Cold Start',
595595
span_id: expect.any(String),
596596
op: APP_START_COLD_OP,
597597
origin: SPAN_ORIGIN_AUTO_APP_START,
@@ -802,7 +802,7 @@ function expectEventWithAttachedColdAppStart({
802802
spans: expect.arrayContaining<SpanJSON>([
803803
{
804804
op: APP_START_COLD_OP,
805-
description: 'Cold App Start',
805+
description: 'Cold Start',
806806
start_timestamp: appStartTimeMilliseconds / 1000,
807807
timestamp: expect.any(Number),
808808
trace_id: expect.any(String),
@@ -856,7 +856,7 @@ function expectEventWithAttachedWarmAppStart({
856856
spans: expect.arrayContaining<SpanJSON>([
857857
{
858858
op: APP_START_WARM_OP,
859-
description: 'Warm App Start',
859+
description: 'Warm Start',
860860
start_timestamp: appStartTimeMilliseconds / 1000,
861861
timestamp: expect.any(Number),
862862
trace_id: expect.any(String),
@@ -913,7 +913,7 @@ function expectEventWithStandaloneColdAppStart(
913913
spans: expect.arrayContaining<SpanJSON>([
914914
{
915915
op: APP_START_COLD_OP,
916-
description: 'Cold App Start',
916+
description: 'Cold Start',
917917
start_timestamp: appStartTimeMilliseconds / 1000,
918918
timestamp: expect.any(Number),
919919
trace_id: expect.any(String),
@@ -962,7 +962,7 @@ function expectEventWithStandaloneWarmAppStart(
962962
spans: expect.arrayContaining<SpanJSON>([
963963
{
964964
op: APP_START_WARM_OP,
965-
description: 'Warm App Start',
965+
description: 'Warm Start',
966966
start_timestamp: appStartTimeMilliseconds / 1000,
967967
timestamp: expect.any(Number),
968968
trace_id: expect.any(String),

packages/core/test/tracing/reactnavigation.ttid.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ describe('React Navigation - TTID', () => {
255255
type: 'transaction',
256256
spans: expect.arrayContaining([
257257
expect.objectContaining<Partial<SpanJSON>>({
258-
description: 'Cold App Start',
258+
description: 'Cold Start',
259259
}),
260260
expect.objectContaining<Partial<SpanJSON>>({
261261
data: {
@@ -289,7 +289,7 @@ describe('React Navigation - TTID', () => {
289289
type: 'transaction',
290290
spans: expect.arrayContaining([
291291
expect.objectContaining<Partial<SpanJSON>>({
292-
description: 'Cold App Start',
292+
description: 'Cold Start',
293293
}),
294294
expect.objectContaining<Partial<SpanJSON>>({
295295
data: {
@@ -319,7 +319,7 @@ describe('React Navigation - TTID', () => {
319319
type: 'transaction',
320320
spans: expect.arrayContaining([
321321
expect.objectContaining<Partial<SpanJSON>>({
322-
description: 'Cold App Start',
322+
description: 'Cold Start',
323323
}),
324324
]),
325325
measurements: expect.objectContaining<Required<TransactionEvent>['measurements']>({

0 commit comments

Comments
 (0)