Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update JavaScript SDK to v8.44.0 #4325

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 28, 2024

Bumps scripts/update-javascript.sh from 8.41.0 to 8.44.0.

Auto-generated by a dependency updater.

Changelog

8.44.0

Deprecations

  • feat: Deprecate autoSessionTracking (#14640)

    Deprecates autoSessionTracking.
    To enable session tracking, it is recommended to unset autoSessionTracking and ensure that either, in browser environments
    the browserSessionIntegration is added, or in server environments the httpIntegration is added.

    To disable session tracking, it is recommended to unset autoSessionTracking and to remove the browserSessionIntegration in
    browser environments, or in server environments configure the httpIntegration with the trackIncomingRequestsAsSessions option set to false.

Other Changes

  • feat: Reword log message around unsent spans (#14641)
  • feat(opentelemetry): Set response context for http.server spans (#14634)
  • fix(google-cloud-serverless): Update homepage link in package.json (#14411)
  • fix(nuxt): Add unbuild config to not fail on warn (#14662)

Work in this release was contributed by robinvw1. Thank you for your contribution!

8.43.0

Important Changes

  • feat(nuxt): Add option autoInjectServerSentry (no default import()) (#14553)

    Using the dynamic import() as the default behavior for initializing the SDK on the server-side did not work for every project.
    The default behavior of the SDK has been changed, and you now need to use the --import flag to initialize Sentry on the server-side to leverage full functionality.

    Example with --import:

    node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs

    In case you are not able to use the --import flag, you can enable auto-injecting Sentry in the nuxt.config.ts (comes with limitations):

    sentry: {
      autoInjectServerSentry: 'top-level-import', // or 'experimental_dynamic-import'
    },
  • feat(browser): Adds LaunchDarkly and OpenFeature integrations (#14207)

    Adds browser SDK integrations for tracking feature flag evaluations through the LaunchDarkly JS SDK and OpenFeature Web SDK:

    import * as Sentry from 'sentry/browser';
    
    Sentry.init({
      integrations: [
        // Track LaunchDarkly feature flags
        Sentry.launchDarklyIntegration(),
        // Track OpenFeature feature flags
        Sentry.openFeatureIntegration(),
      ],
    });
  • feat(browser): Add featureFlagsIntegration for custom tracking of flag evaluations (#14582)

    Adds a browser integration to manually track feature flags with an API. Feature flags are attached to subsequent error events:

    import * as Sentry from 'sentry/browser';
    
    const featureFlagsIntegrationInstance = Sentry.featureFlagsIntegration();
    
    Sentry.init({
      // Initialize the SDK with the feature flag integration
      integrations: [featureFlagsIntegrationInstance],
    });
    
    // Manually track a feature flag
    featureFlagsIntegrationInstance.addFeatureFlag('my-feature', true);
  • feat(astro): Add Astro 5 support (#14613)

    With this release, the Sentry Astro SDK officially supports Astro 5.

Deprecations

  • feat(nextjs): Deprecate typedef for hideSourceMaps (#14594)

    The functionality of hideSourceMaps was removed in version 8 but was forgotten to be deprecated and removed.
    It will be completely removed in the next major version.

  • feat(core): Deprecate APIs around RequestSessions (#14566)

    The APIs around RequestSessions are mostly used internally.
    Going forward the SDK will not expose concepts around RequestSessions.
    Instead, functionality around server-side Release Health will be managed in integrations.

Other Changes

  • feat(browser): Add browserSessionIntegration (#14551)
  • feat(core): Add raw_security envelope types (#14562)
  • feat(deps): Bump opentelemetry/instrumentation from 0.55.0 to 0.56.0 (#14625)
  • feat(deps): Bump sentry/cli from 2.38.2 to 2.39.1 (#14626)
  • feat(deps): Bump sentry/rollup-plugin from 2.22.6 to 2.22.7 (#14622)
  • feat(deps): Bump sentry/webpack-plugin from 2.22.6 to 2.22.7 (#14623)
  • feat(nestjs): Add fastify support (#14549)
  • feat(node): Add vercel/ai instrumentation (#13892)
  • feat(node): Add disableAnrDetectionForCallback function (#14359)
  • feat(node): Add trackIncomingRequestsAsSessions option to http integration (#14567)
  • feat(nuxt): Add option autoInjectServerSentry (no default import()) (#14553)
  • feat(nuxt): Add warning when Netlify or Vercel build is discovered (#13868)
  • feat(nuxt): Improve serverless event flushing and scope isolation (#14605)
  • feat(opentelemetry): Stop looking at propagation context for span creation (#14481)
  • feat(opentelemetry): Update OpenTelemetry dependencies to ^1.29.0 (#14590)
  • feat(opentelemetry): Update OpenTelemetry dependencies to 1.28.0 (#14547)
  • feat(replay): Upgrade rrweb packages to 2.30.0 (#14597)
  • fix(core): Decode filename and module stack frame properties in Node stack parser (#14544)
  • fix(core): Filter out unactionable CEFSharp promise rejection error by default (#14595)
  • fix(nextjs): Don't show warning about devtool option (#14552)
  • fix(nextjs): Only apply tracing metadata to data fetcher data when data is an object (#14575)
  • fix(node): Guard against invalid maxSpanWaitDuration values (#14632)
  • fix(react): Match routes with parseSearch option in TanStack Router instrumentation (#14328)
  • fix(sveltekit): Fix git SHA not being picked up for release (#14540)
  • fix(types): Fix generic exports with default (#14576)

Work in this release was contributed by lsmurray. Thank you for your contribution!

8.42.0

Important Changes

Deprecations

  • feat: Warn about source-map generation (#14533)

    In the next major version of the SDK we will change how source maps are generated when the SDK is added to an application.
    Currently, the implementation varies a lot between different SDKs and can be difficult to understand.
    Moving forward, our goal is to turn on source maps for every framework, unless we detect that they are explicitly turned off.
    Additionally, if we end up enabling source maps, we will emit a log message that we did so.

    With this particular release, we are emitting warnings that source map generation will change in the future and we print instructions on how to prepare for the next major.

  • feat(nuxt): Deprecate tracingOptions in favor of vueIntegration (#14530)

    Currently it is possible to configure tracing options in two places in the Sentry Nuxt SDK:

    • In Sentry.init()
    • Inside tracingOptions in Sentry.init()

    For tree-shaking purposes and alignment with the Vue SDK, it is now recommended to instead use the newly exported vueIntegration() and its tracingOptions option to configure tracing options in the Nuxt SDK:

    // sentry.client.config.ts
    import * as Sentry from 'sentry/nuxt';
    
    Sentry.init({
      // ...
      integrations: [
        Sentry.vueIntegration({
          tracingOptions: {
            trackComponents: true,
          },
        }),
      ],
    });

Other Changes

  • feat(browser-utils): Update web-vitals to v4.2.4 (#14439)
  • feat(nuxt): Expose vueIntegration (#14526)
  • fix(feedback): Handle css correctly in screenshot mode (#14535)

@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Nov 28, 2024
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-javascript.sh branch from 834230e to 114cc6a Compare November 28, 2024 03:19
Copy link
Contributor Author

github-actions bot commented Nov 28, 2024

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 515.94 ms 507.66 ms -8.28 ms
Size 17.74 MiB 20.10 MiB 2.36 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d43a46b 454.22 ms 477.79 ms 23.57 ms
5a22220 412.38 ms 447.35 ms 34.97 ms
e2b64fe 316.88 ms 330.23 ms 13.35 ms
80b2ce3 385.02 ms 387.36 ms 2.34 ms
8ae23a7 526.83 ms 513.38 ms -13.45 ms
83f6f6c 418.83 ms 410.94 ms -7.89 ms
77680ec 482.22 ms 475.07 ms -7.16 ms
d2c32bb 448.85 ms 450.19 ms 1.34 ms
9c48b2c 349.24 ms 385.96 ms 36.72 ms
1d86dd6 405.14 ms 411.06 ms 5.92 ms

App size

Revision Plain With Sentry Diff
d43a46b 17.73 MiB 20.06 MiB 2.33 MiB
5a22220 17.73 MiB 19.93 MiB 2.20 MiB
e2b64fe 17.73 MiB 19.80 MiB 2.07 MiB
80b2ce3 17.73 MiB 19.75 MiB 2.02 MiB
8ae23a7 17.74 MiB 20.07 MiB 2.34 MiB
83f6f6c 17.74 MiB 20.09 MiB 2.35 MiB
77680ec 17.74 MiB 20.08 MiB 2.34 MiB
d2c32bb 17.74 MiB 20.08 MiB 2.34 MiB
9c48b2c 17.73 MiB 19.80 MiB 2.07 MiB
1d86dd6 17.73 MiB 19.86 MiB 2.12 MiB

Previous results on branch: deps/scripts/update-javascript.sh

Startup times

Revision Plain With Sentry Diff
ee6386c 427.32 ms 410.51 ms -16.81 ms
4a9de34 423.00 ms 429.66 ms 6.66 ms
adf3982 425.40 ms 405.88 ms -19.52 ms
727778d 472.20 ms 462.50 ms -9.70 ms
77069a3 341.91 ms 358.43 ms 16.52 ms
1e9894e 431.94 ms 445.06 ms 13.12 ms
965cf9f 451.98 ms 459.43 ms 7.46 ms
f193e90 432.83 ms 433.10 ms 0.27 ms
cdeca8b 438.11 ms 436.48 ms -1.63 ms
88a5c10 425.60 ms 414.21 ms -11.39 ms

App size

Revision Plain With Sentry Diff
ee6386c 17.74 MiB 20.08 MiB 2.35 MiB
4a9de34 17.74 MiB 20.08 MiB 2.34 MiB
adf3982 17.74 MiB 20.08 MiB 2.35 MiB
727778d 17.74 MiB 20.09 MiB 2.35 MiB
77069a3 17.74 MiB 20.08 MiB 2.35 MiB
1e9894e 17.74 MiB 20.08 MiB 2.34 MiB
965cf9f 17.74 MiB 20.09 MiB 2.35 MiB
f193e90 17.74 MiB 20.08 MiB 2.34 MiB
cdeca8b 17.74 MiB 20.07 MiB 2.34 MiB
88a5c10 17.74 MiB 20.08 MiB 2.35 MiB

Copy link
Contributor Author

github-actions bot commented Nov 28, 2024

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 370.23 ms 413.69 ms 43.46 ms
Size 7.15 MiB 8.37 MiB 1.22 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
0d3e677+dirty 384.24 ms 431.45 ms 47.21 ms
d43a46b+dirty 417.65 ms 472.98 ms 55.33 ms
484813b+dirty 411.65 ms 456.02 ms 44.37 ms
fe13591+dirty 539.51 ms 597.92 ms 58.40 ms
f06c879+dirty 361.27 ms 407.88 ms 46.61 ms
e22745e+dirty 415.50 ms 448.76 ms 33.26 ms
9cd0e9f+dirty 383.65 ms 418.65 ms 35.00 ms
70e6261+dirty 395.08 ms 408.12 ms 13.04 ms
5a22220+dirty 384.61 ms 419.06 ms 34.45 ms
e540498+dirty 408.56 ms 480.00 ms 71.44 ms

App size

Revision Plain With Sentry Diff
0d3e677+dirty 7.15 MiB 8.35 MiB 1.20 MiB
d43a46b+dirty 7.15 MiB 8.34 MiB 1.19 MiB
484813b+dirty 7.15 MiB 8.34 MiB 1.19 MiB
fe13591+dirty 7.15 MiB 8.35 MiB 1.20 MiB
f06c879+dirty 7.15 MiB 8.12 MiB 997.78 KiB
e22745e+dirty 7.15 MiB 8.35 MiB 1.20 MiB
9cd0e9f+dirty 7.15 MiB 8.35 MiB 1.20 MiB
70e6261+dirty 7.15 MiB 8.21 MiB 1.07 MiB
5a22220+dirty 7.15 MiB 8.21 MiB 1.06 MiB
e540498+dirty 7.15 MiB 8.38 MiB 1.23 MiB

Previous results on branch: deps/scripts/update-javascript.sh

Startup times

Revision Plain With Sentry Diff
5746aef+dirty 412.98 ms 457.49 ms 44.51 ms
e4c23be+dirty 379.09 ms 412.68 ms 33.59 ms
0ce9e4f+dirty 423.69 ms 467.82 ms 44.13 ms
7871424+dirty 417.35 ms 468.16 ms 50.81 ms
f193e90+dirty 370.91 ms 498.10 ms 127.19 ms
ce14fde+dirty 366.85 ms 433.49 ms 66.64 ms
4a9de34+dirty 385.19 ms 429.35 ms 44.16 ms
965cf9f+dirty 394.06 ms 427.53 ms 33.47 ms
727778d+dirty 379.36 ms 416.67 ms 37.32 ms
77069a3+dirty 385.04 ms 409.51 ms 24.47 ms

App size

Revision Plain With Sentry Diff
5746aef+dirty 7.15 MiB 8.37 MiB 1.22 MiB
e4c23be+dirty 7.15 MiB 8.35 MiB 1.20 MiB
0ce9e4f+dirty 7.15 MiB 8.37 MiB 1.22 MiB
7871424+dirty 7.15 MiB 8.35 MiB 1.20 MiB
f193e90+dirty 7.15 MiB 8.35 MiB 1.20 MiB
ce14fde+dirty 7.15 MiB 8.37 MiB 1.22 MiB
4a9de34+dirty 7.15 MiB 8.35 MiB 1.20 MiB
965cf9f+dirty 7.15 MiB 8.37 MiB 1.22 MiB
727778d+dirty 7.15 MiB 8.37 MiB 1.22 MiB
77069a3+dirty 7.15 MiB 8.36 MiB 1.21 MiB

Copy link
Contributor Author

github-actions bot commented Nov 28, 2024

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1218.88 ms 1223.98 ms 5.11 ms
Size 2.36 MiB 3.10 MiB 759.41 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
fe13591+dirty 1208.25 ms 1219.53 ms 11.28 ms
8ab11b6+dirty 1203.23 ms 1206.02 ms 2.79 ms
b8ff156+dirty 1236.51 ms 1234.53 ms -1.98 ms
83f6f6c+dirty 1218.33 ms 1220.27 ms 1.93 ms
c2a4e9b+dirty 1240.10 ms 1239.22 ms -0.88 ms
abb7058+dirty 1255.42 ms 1268.86 ms 13.44 ms
07e58c9+dirty 1226.02 ms 1228.35 ms 2.33 ms
e22745e+dirty 1222.73 ms 1224.98 ms 2.25 ms
8c88ac7+dirty 1205.13 ms 1218.87 ms 13.74 ms
728164b+dirty 1256.10 ms 1259.08 ms 2.98 ms

App size

Revision Plain With Sentry Diff
fe13591+dirty 2.36 MiB 3.10 MiB 752.40 KiB
8ab11b6+dirty 2.36 MiB 3.11 MiB 759.83 KiB
b8ff156+dirty 2.36 MiB 3.11 MiB 759.80 KiB
83f6f6c+dirty 2.36 MiB 3.10 MiB 759.79 KiB
c2a4e9b+dirty 2.36 MiB 3.08 MiB 734.00 KiB
abb7058+dirty 2.36 MiB 2.87 MiB 520.42 KiB
07e58c9+dirty 2.36 MiB 3.10 MiB 752.28 KiB
e22745e+dirty 2.36 MiB 3.10 MiB 752.32 KiB
8c88ac7+dirty 2.36 MiB 3.10 MiB 752.63 KiB
728164b+dirty 2.36 MiB 2.88 MiB 530.38 KiB

Previous results on branch: deps/scripts/update-javascript.sh

Startup times

Revision Plain With Sentry Diff
1428daf+dirty 1231.58 ms 1226.54 ms -5.04 ms
1e9894e+dirty 1213.33 ms 1225.16 ms 11.83 ms
f193e90+dirty 1224.20 ms 1229.10 ms 4.90 ms
0ce9e4f+dirty 1226.02 ms 1229.73 ms 3.71 ms
e4c23be+dirty 1225.25 ms 1223.76 ms -1.49 ms
bca5c58+dirty 1208.27 ms 1212.41 ms 4.14 ms
77069a3+dirty 1230.69 ms 1230.64 ms -0.06 ms
4a9de34+dirty 1215.58 ms 1218.76 ms 3.17 ms
727778d+dirty 1230.17 ms 1229.23 ms -0.94 ms
ee6386c+dirty 1225.21 ms 1237.80 ms 12.59 ms

App size

Revision Plain With Sentry Diff
1428daf+dirty 2.36 MiB 3.10 MiB 759.42 KiB
1e9894e+dirty 2.36 MiB 3.10 MiB 752.76 KiB
f193e90+dirty 2.36 MiB 3.08 MiB 737.28 KiB
0ce9e4f+dirty 2.36 MiB 3.10 MiB 759.36 KiB
e4c23be+dirty 2.36 MiB 3.08 MiB 737.17 KiB
bca5c58+dirty 2.36 MiB 3.10 MiB 752.95 KiB
77069a3+dirty 2.36 MiB 3.10 MiB 755.88 KiB
4a9de34+dirty 2.36 MiB 3.10 MiB 753.19 KiB
727778d+dirty 2.36 MiB 3.10 MiB 759.49 KiB
ee6386c+dirty 2.36 MiB 3.10 MiB 759.43 KiB

Copy link
Contributor Author

github-actions bot commented Nov 28, 2024

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1218.98 ms 1230.51 ms 11.53 ms
Size 2.92 MiB 3.67 MiB 771.99 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
fe13591+dirty 1250.69 ms 1246.27 ms -4.43 ms
8ab11b6+dirty 1222.91 ms 1216.08 ms -6.83 ms
b8ff156+dirty 1238.92 ms 1239.57 ms 0.66 ms
83f6f6c+dirty 1232.02 ms 1229.15 ms -2.87 ms
c2a4e9b+dirty 1247.39 ms 1243.04 ms -4.35 ms
abb7058+dirty 1260.28 ms 1266.56 ms 6.28 ms
07e58c9+dirty 1216.42 ms 1210.60 ms -5.82 ms
e22745e+dirty 1246.02 ms 1233.60 ms -12.42 ms
8c88ac7+dirty 1240.66 ms 1247.42 ms 6.76 ms
728164b+dirty 1280.06 ms 1285.26 ms 5.20 ms

App size

Revision Plain With Sentry Diff
fe13591+dirty 2.92 MiB 3.66 MiB 757.71 KiB
8ab11b6+dirty 2.92 MiB 3.67 MiB 772.38 KiB
b8ff156+dirty 2.92 MiB 3.67 MiB 772.38 KiB
83f6f6c+dirty 2.92 MiB 3.67 MiB 772.37 KiB
c2a4e9b+dirty 2.92 MiB 3.64 MiB 739.91 KiB
abb7058+dirty 2.92 MiB 3.43 MiB 524.53 KiB
07e58c9+dirty 2.92 MiB 3.66 MiB 756.65 KiB
e22745e+dirty 2.92 MiB 3.66 MiB 756.73 KiB
8c88ac7+dirty 2.92 MiB 3.66 MiB 757.12 KiB
728164b+dirty 2.92 MiB 3.44 MiB 533.26 KiB

Previous results on branch: deps/scripts/update-javascript.sh

Startup times

Revision Plain With Sentry Diff
1428daf+dirty 1235.27 ms 1237.24 ms 1.98 ms
1e9894e+dirty 1233.37 ms 1226.96 ms -6.41 ms
f193e90+dirty 1228.43 ms 1229.02 ms 0.59 ms
0ce9e4f+dirty 1237.40 ms 1238.87 ms 1.47 ms
e4c23be+dirty 1232.21 ms 1230.16 ms -2.05 ms
bca5c58+dirty 1224.23 ms 1224.90 ms 0.66 ms
77069a3+dirty 1250.24 ms 1251.69 ms 1.45 ms
4a9de34+dirty 1234.35 ms 1230.35 ms -3.99 ms
727778d+dirty 1230.11 ms 1226.70 ms -3.42 ms
ee6386c+dirty 1245.20 ms 1248.29 ms 3.08 ms

App size

Revision Plain With Sentry Diff
1428daf+dirty 2.92 MiB 3.67 MiB 772.07 KiB
1e9894e+dirty 2.92 MiB 3.66 MiB 757.26 KiB
f193e90+dirty 2.92 MiB 3.64 MiB 742.92 KiB
0ce9e4f+dirty 2.92 MiB 3.67 MiB 771.89 KiB
e4c23be+dirty 2.92 MiB 3.64 MiB 742.98 KiB
bca5c58+dirty 2.92 MiB 3.66 MiB 757.55 KiB
77069a3+dirty 2.92 MiB 3.66 MiB 761.09 KiB
4a9de34+dirty 2.92 MiB 3.66 MiB 757.67 KiB
727778d+dirty 2.92 MiB 3.67 MiB 771.96 KiB
ee6386c+dirty 2.92 MiB 3.67 MiB 772.02 KiB

@antonis
Copy link
Collaborator

antonis commented Nov 28, 2024

feat(core): Update & deprecate undefined option handling (#14450)

The following tests fail due to a change on how event.environment is set in getsentry/sentry-javascript#14450

  • profiling integration › environment › should keep nullish for transaction and profile uses default
  • profiling integration › environment › should use native environment for transaction and profile if user value is nullish

The tests could be fixed with a patch like the following setting production as the default environment value but we should investigate if there other side effects of not using our getDefaultEnvironment in those cases and if functional code changes are needed.

Patch

diff --git a/packages/core/test/profiling/integration.test.ts b/packages/core/test/profiling/integration.test.ts
index f6801aa0..5fc7d9e5 100644
--- a/packages/core/test/profiling/integration.test.ts
+++ b/packages/core/test/profiling/integration.test.ts
@@ -7,7 +7,6 @@ import { getClient, spanToJSON } from '@sentry/core';
 import type { Envelope, Event, Integration, Profile, Span, ThreadCpuProfile, Transport } from '@sentry/types';
 
 import * as Sentry from '../../src/js';
-import type { NativeDeviceContextsResponse } from '../../src/js/NativeRNSentry';
 import { getDebugMetadata } from '../../src/js/profiling/debugid';
 import type { HermesProfilingOptions } from '../../src/js/profiling/integration';
 import { hermesProfilingIntegration } from '../../src/js/profiling/integration';
@@ -79,9 +78,6 @@ describe('profiling integration', () => {
   describe('environment', () => {
     beforeEach(() => {
       (getDefaultEnvironment as jest.Mock).mockReturnValue('mocked');
-      mockWrapper.NATIVE.fetchNativeDeviceContexts.mockResolvedValue(<NativeDeviceContextsResponse>{
-        environment: 'native',
-      });
     });
 
     const expectTransactionWithEnvironment = (envelope: Envelope | undefined, env: string | undefined) => {
@@ -114,7 +110,7 @@ describe('profiling integration', () => {
       expectProfileWithEnvironment(envelope, 'mocked');
     });
 
-    test('should use native environment for transaction and profile if user value is nullish', () => {
+    test('should use production environment (default JS) for transaction and profile if user value is nullish', () => {
       mock = initTestClient({ withProfiling: true, environment: '' });
 
       Sentry.startSpan({ name: 'test-name' }, () => {});
@@ -122,14 +118,11 @@ describe('profiling integration', () => {
       jest.runAllTimers();
 
       const envelope: Envelope | undefined = mock.transportSendMock.mock.lastCall?.[0];
-      expectTransactionWithEnvironment(envelope, 'native');
-      expectProfileWithEnvironment(envelope, 'native');
+      expectTransactionWithEnvironment(envelope, 'production');
+      expectProfileWithEnvironment(envelope, 'production');
     });
 
-    test('should keep nullish for transaction and profile uses default', () => {
-      mockWrapper.NATIVE.fetchNativeDeviceContexts.mockResolvedValue(<NativeDeviceContextsResponse>{
-        environment: undefined,
-      });
+    test('should use production environment (default JS) for transaction and profile if user value is undefined', () => {
       mock = initTestClient({ withProfiling: true, environment: undefined });
 
       Sentry.startSpan({ name: 'test-name' }, () => {});
@@ -137,8 +130,8 @@ describe('profiling integration', () => {
       jest.runAllTimers();
 
       const envelope: Envelope | undefined = mock.transportSendMock.mock.lastCall?.[0];
-      expectTransactionWithEnvironment(envelope, undefined);
-      expectProfileWithEnvironment(envelope, 'mocked');
+      expectTransactionWithEnvironment(envelope, 'production');
+      expectProfileWithEnvironment(envelope, 'production');
     });
 
     test('should keep custom environment for transaction and profile', () => {

The current react-native behavior introduced with #3362 that sets the environment to production or development can no longer be applied since the environment defaults to production in JS if not set.

cc @krystofwoldrich

@antonis antonis mentioned this pull request Nov 28, 2024
@antonis
Copy link
Collaborator

antonis commented Nov 28, 2024

feat(utils): Deprecate sentry/utils (#14431)

Opened an issue for this
#4327

@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-javascript.sh branch 5 times, most recently from 469b81a to d443506 Compare December 2, 2024 10:50
@github-actions github-actions bot changed the title chore(deps): update JavaScript SDK to v8.41.0 chore(deps): update JavaScript SDK to v8.42.0 Dec 2, 2024
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-javascript.sh branch 5 times, most recently from 9906c76 to 0a89c5e Compare December 9, 2024 09:46
@antonis
Copy link
Collaborator

antonis commented Dec 9, 2024

Since 8.42.0 introduces new changes that need handling and to simplify the update/review process I opened the following PRs to handle the 8.41.0 update first:

@antonis
Copy link
Collaborator

antonis commented Dec 9, 2024

Since 8.42.0 introduces new changes that need handling

The SDK fails to build after the `8.42.0` bump with the following errors.

   ✖  @sentry/react-native:build
      > @sentry/[email protected] build:sdk
      > tsc -p tsconfig.build.json
      
      src/js/client.ts(35,51): error TS2344: Type 'ReactNativeClientOptions' does not satisfy the constraint 'ClientOptions<BaseTransportOptions>'.
        Type 'ReactNativeClientOptions' is missing the following properties from type 'ClientOptions<BaseTransportOptions>': integrations, transport, stackParser
      src/js/integrations/release.ts(21,11): error TS2315: Type 'Client' is not generic.
      src/js/integrations/release.ts(21,18): error TS2315: Type 'ClientOptions' is not generic.
      src/js/integrations/screenshot.ts(16,5): error TS2322: Type '(event: Event, hint: EventHint, client: ReactNativeClient) => Promise<Event>' is not assignable to type '(event: Event, hint: EventHint, client: Client<ClientOptions<BaseTransportOptions>>) => Event | PromiseLike<Event>'.
        Types of parameters 'client' and 'client' are incompatible.
          Type 'Client<ClientOptions<BaseTransportOptions>>' is missing the following properties from type 'ReactNativeClient': _outcomesBuffer, nativeCrash, captureUserFeedback, _initNativeSdk, and 18 more.
      src/js/integrations/spotlight.ts(34,19): error TS2315: Type 'Client' is not generic.
      src/js/integrations/spotlight.ts(34,26): error TS2315: Type 'ClientOptions' is not generic.
      src/js/options.ts(266,16): error TS2315: Type 'Options' is not generic.
      src/js/options.ts(270,16): error TS2315: Type 'ClientOptions' is not generic.
      src/js/profiling/integration.ts(131,30): error TS2344: Type 'ReactNativeClient' does not satisfy the constraint 'Client<ClientOptions<BaseTransportOptions>>'.
        The types returned by 'getOptions()' are incompatible between these types.
          Type 'ReactNativeClientOptions' is not assignable to type 'ClientOptions<BaseTransportOptions>'.
      src/js/sdk.tsx(143,15): error TS2345: Argument of type 'typeof ReactNativeClient' is not assignable to parameter of type 'ClientClass<Client<ClientOptions<BaseTransportOptions>>, ClientOptions<BaseTransportOptions>>'.
        Types of construct signatures are incompatible.
          Type 'new (options: ReactNativeClientOptions) => ReactNativeClient' is not assignable to type 'new (options: ClientOptions<BaseTransportOptions>) => Client<ClientOptions<BaseTransportOptions>>'.
            Construct signature return types 'ReactNativeClient' and 'Client<ClientOptions<BaseTransportOptions>>' are incompatible.
              The types of 'getOptions' are incompatible between these types.
                Type '() => ReactNativeClientOptions' is not assignable to type '() => ClientOptions<BaseTransportOptions>'.
      npm error Lifecycle script `build:sdk` failed with error:
      npm error Error: command failed
      npm error   in workspace: @sentry/[email protected]
      npm error   at location: /Users/antonis/git/sentry-react-native/packages/core
      ERROR: "build:sdk" exited with 1.

The issue seems to be related with the move of the implementation for @sentry/types into @sentry/core and is fixed by replacing the deprecated sentry/types with sentry/core.
I've opened an issue for this #4349 and I will push the changes on this PR after the 8.41.0 fixes to avoid conflicts.

@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-javascript.sh branch 2 times, most recently from e136a08 to c765c8d Compare December 11, 2024 03:18
@github-actions github-actions bot changed the title chore(deps): update JavaScript SDK to v8.42.0 chore(deps): update JavaScript SDK to v8.43.0 Dec 11, 2024
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-javascript.sh branch from c765c8d to 8d1dd4e Compare December 11, 2024 08:26
@github-actions github-actions bot changed the title chore(deps): update JavaScript SDK to v8.43.0 chore(deps): update JavaScript SDK to v8.44.0 Dec 12, 2024
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-javascript.sh branch 4 times, most recently from 684ea80 to 3e282e3 Compare December 12, 2024 17:13
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-javascript.sh branch from 3e282e3 to 9485aed Compare December 12, 2024 18:27
@antonis
Copy link
Collaborator

antonis commented Dec 13, 2024

The SDK fails to build after the 8.42.0 bump with the following errors.

This looks fixed after 8.42.0 and all the tests are clean 🎉

@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-javascript.sh branch from 9485aed to 0b6a6d3 Compare December 13, 2024 08:29
@antonis antonis mentioned this pull request Dec 13, 2024
10 tasks
Copy link
Collaborator

@antonis antonis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@antonis antonis merged commit fd7919f into main Dec 13, 2024
62 checks passed
@antonis antonis deleted the deps/scripts/update-javascript.sh branch December 13, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants