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

feat(sdk): Automatically detect environment if not set by User #3362

Merged
merged 5 commits into from
Oct 30, 2023

Conversation

krystofwoldrich
Copy link
Member

@krystofwoldrich krystofwoldrich commented Oct 24, 2023

📢 Type of change

  • New feature

📜 Description

Detection is based on the JS environment and the global __DEV__ property user can override the value.

This change might affect users not setting the environment option at the moment. As their dev builds will now have development environment.

💡 Motivation and Context

💚 How did you test it?

sample app, tests

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • All tests passing
  • No breaking changes

🔮 Next steps

@krystofwoldrich krystofwoldrich changed the title Kw-detect-default-environment feat(sdk): Automatically detect environment if not set by User Oct 24, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2023

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 55eb480

@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2023

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 390.89 ms 439.90 ms 49.01 ms
Size 17.73 MiB 19.86 MiB 2.12 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
dadc233+dirty 333.78 ms 343.94 ms 10.16 ms
acadc0f+dirty 373.24 ms 381.51 ms 8.27 ms
e5c9b8b 409.02 ms 426.66 ms 17.64 ms
86d6d2c+dirty 332.90 ms 352.45 ms 19.55 ms
0677344 327.74 ms 337.14 ms 9.40 ms
d7401ac+dirty 375.20 ms 383.51 ms 8.31 ms
457e29f 398.10 ms 421.39 ms 23.29 ms
9c48b2c 349.24 ms 385.96 ms 36.72 ms
0db0c72 372.12 ms 386.00 ms 13.88 ms
9a3ca65+dirty 326.93 ms 330.14 ms 3.21 ms

App size

Revision Plain With Sentry Diff
dadc233+dirty 17.73 MiB 19.75 MiB 2.02 MiB
acadc0f+dirty 17.73 MiB 19.75 MiB 2.01 MiB
e5c9b8b 17.73 MiB 19.83 MiB 2.10 MiB
86d6d2c+dirty 17.73 MiB 20.04 MiB 2.31 MiB
0677344 17.73 MiB 19.81 MiB 2.07 MiB
d7401ac+dirty 17.73 MiB 19.75 MiB 2.02 MiB
457e29f 17.73 MiB 19.84 MiB 2.10 MiB
9c48b2c 17.73 MiB 19.80 MiB 2.07 MiB
0db0c72 17.73 MiB 19.75 MiB 2.02 MiB
9a3ca65+dirty 17.73 MiB 20.04 MiB 2.31 MiB

@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2023

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1283.56 ms 1303.53 ms 19.97 ms
Size 2.36 MiB 2.88 MiB 533.18 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e2b64fe+dirty 1232.22 ms 1255.20 ms 22.98 ms
3853f43+dirty 1221.82 ms 1242.64 ms 20.82 ms
dadc233+dirty 1223.20 ms 1236.88 ms 13.68 ms
457e29f+dirty 1253.94 ms 1269.18 ms 15.24 ms
acadc0f+dirty 1264.38 ms 1290.06 ms 25.68 ms
0db0c72+dirty 1275.02 ms 1285.84 ms 10.82 ms
86d6d2c+dirty 1267.55 ms 1286.21 ms 18.66 ms
5446992+dirty 1273.28 ms 1276.68 ms 3.40 ms
d7401ac+dirty 1252.38 ms 1275.04 ms 22.66 ms
ad6c299+dirty 1244.76 ms 1260.10 ms 15.34 ms

App size

Revision Plain With Sentry Diff
e2b64fe+dirty 2.36 MiB 2.85 MiB 495.80 KiB
3853f43+dirty 2.36 MiB 2.85 MiB 499.81 KiB
dadc233+dirty 2.36 MiB 2.84 MiB 486.85 KiB
457e29f+dirty 2.36 MiB 2.87 MiB 520.67 KiB
acadc0f+dirty 2.36 MiB 2.83 MiB 480.37 KiB
0db0c72+dirty 2.36 MiB 2.84 MiB 487.01 KiB
86d6d2c+dirty 2.36 MiB 2.82 MiB 462.82 KiB
5446992+dirty 2.36 MiB 2.88 MiB 531.94 KiB
d7401ac+dirty 2.36 MiB 2.83 MiB 481.14 KiB
ad6c299+dirty 2.36 MiB 2.84 MiB 488.85 KiB

@krystofwoldrich krystofwoldrich marked this pull request as ready for review October 25, 2023 10:48
@krystofwoldrich krystofwoldrich self-assigned this Oct 25, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2023

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 350.32 ms 398.24 ms 47.92 ms
Size 7.15 MiB 8.13 MiB 1002.18 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e2b64fe+dirty 258.82 ms 304.26 ms 45.44 ms
3853f43+dirty 278.12 ms 338.72 ms 60.60 ms
dadc233+dirty 363.19 ms 370.37 ms 7.18 ms
457e29f+dirty 591.49 ms 612.96 ms 21.47 ms
acadc0f+dirty 259.04 ms 304.67 ms 45.63 ms
0db0c72+dirty 335.20 ms 351.06 ms 15.86 ms
86d6d2c+dirty 267.21 ms 325.24 ms 58.04 ms
5446992+dirty 371.61 ms 390.00 ms 18.39 ms
d7401ac+dirty 373.98 ms 394.08 ms 20.10 ms
ad6c299+dirty 336.47 ms 362.89 ms 26.42 ms

App size

Revision Plain With Sentry Diff
e2b64fe+dirty 7.15 MiB 8.07 MiB 947.16 KiB
3853f43+dirty 7.15 MiB 8.08 MiB 959.34 KiB
dadc233+dirty 7.15 MiB 8.04 MiB 910.84 KiB
457e29f+dirty 7.15 MiB 8.10 MiB 981.29 KiB
acadc0f+dirty 7.15 MiB 8.03 MiB 903.20 KiB
0db0c72+dirty 7.15 MiB 8.04 MiB 911.02 KiB
86d6d2c+dirty 7.15 MiB 8.09 MiB 962.69 KiB
5446992+dirty 7.15 MiB 8.12 MiB 999.45 KiB
d7401ac+dirty 7.15 MiB 8.04 MiB 910.85 KiB
ad6c299+dirty 7.15 MiB 8.04 MiB 912.17 KiB

src/js/utils/environment.ts Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1285.22 ms 1291.15 ms 5.93 ms
Size 2.92 MiB 3.44 MiB 536.52 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e2b64fe+dirty 1285.78 ms 1297.56 ms 11.78 ms
3853f43+dirty 1271.74 ms 1278.04 ms 6.30 ms
dadc233+dirty 1266.52 ms 1282.55 ms 16.03 ms
457e29f+dirty 1256.71 ms 1258.50 ms 1.79 ms
acadc0f+dirty 1271.12 ms 1272.28 ms 1.16 ms
0db0c72+dirty 1258.88 ms 1262.52 ms 3.64 ms
86d6d2c+dirty 1291.62 ms 1296.80 ms 5.18 ms
5446992+dirty 1249.94 ms 1254.80 ms 4.86 ms
d7401ac+dirty 1288.10 ms 1289.54 ms 1.44 ms
ad6c299+dirty 1248.50 ms 1248.88 ms 0.38 ms

App size

Revision Plain With Sentry Diff
e2b64fe+dirty 2.92 MiB 3.41 MiB 499.97 KiB
3853f43+dirty 2.92 MiB 3.41 MiB 503.54 KiB
dadc233+dirty 2.92 MiB 3.40 MiB 492.53 KiB
457e29f+dirty 2.92 MiB 3.43 MiB 524.75 KiB
acadc0f+dirty 2.92 MiB 3.39 MiB 487.34 KiB
0db0c72+dirty 2.92 MiB 3.40 MiB 492.71 KiB
86d6d2c+dirty 2.92 MiB 3.37 MiB 464.31 KiB
5446992+dirty 2.92 MiB 3.44 MiB 535.26 KiB
d7401ac+dirty 2.92 MiB 3.40 MiB 488.06 KiB
ad6c299+dirty 2.92 MiB 3.40 MiB 494.12 KiB

@krystofwoldrich krystofwoldrich merged commit 6e8584e into main Oct 30, 2023
51 checks passed
@krystofwoldrich krystofwoldrich deleted the kw-detect-default-environment branch October 30, 2023 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants