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

Defaults for Cron - MonitorConfig #3195

Merged
merged 13 commits into from
Feb 29, 2024
Merged

Defaults for Cron - MonitorConfig #3195

merged 13 commits into from
Feb 29, 2024

Conversation

lbloder
Copy link
Collaborator

@lbloder lbloder commented Feb 6, 2024

📜 Description

Allow configuring global default values for checkinMargin, maxRuntime, timezone, recoveryThreshold and failureIssueThreshold of MonitorConfig through SentryOptions.

💡 Motivation and Context

Fixes #3122

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Feb 6, 2024

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

Generated by 🚫 dangerJS against 5267adb

Copy link
Contributor

github-actions bot commented Feb 6, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 406.27 ms 485.45 ms 79.18 ms
Size 1.70 MiB 2.28 MiB 590.90 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
8fd337b 349.16 ms 459.22 ms 110.06 ms
86f0096 381.33 ms 476.58 ms 95.25 ms
2a3dd50 363.61 ms 440.18 ms 76.57 ms
2465853 411.39 ms 461.10 ms 49.72 ms
5e04ee8 380.63 ms 501.84 ms 121.21 ms
c554ca2 364.98 ms 433.64 ms 68.66 ms
4e29063 376.38 ms 390.98 ms 14.60 ms
a3c77bc 375.80 ms 445.85 ms 70.06 ms
4e260b3 378.73 ms 454.18 ms 75.45 ms
eecfab6 399.27 ms 461.82 ms 62.55 ms

App size

Revision Plain With Sentry Diff
8fd337b 1.72 MiB 2.27 MiB 555.00 KiB
86f0096 1.72 MiB 2.29 MiB 576.50 KiB
2a3dd50 1.72 MiB 2.27 MiB 555.05 KiB
2465853 1.70 MiB 2.27 MiB 583.82 KiB
5e04ee8 1.70 MiB 2.27 MiB 584.64 KiB
c554ca2 1.70 MiB 2.27 MiB 582.25 KiB
4e29063 1.72 MiB 2.29 MiB 578.38 KiB
a3c77bc 1.72 MiB 2.29 MiB 577.53 KiB
4e260b3 1.72 MiB 2.27 MiB 554.95 KiB
eecfab6 1.72 MiB 2.27 MiB 558.56 KiB

Previous results on branch: feat/cron-defaults

Startup times

Revision Plain With Sentry Diff
4f3fae8 422.57 ms 497.73 ms 75.15 ms
d4fa6bc 413.08 ms 499.18 ms 86.10 ms
3565505 304.96 ms 351.73 ms 46.78 ms
82e7c8f 424.41 ms 504.44 ms 80.03 ms

App size

Revision Plain With Sentry Diff
4f3fae8 1.70 MiB 2.27 MiB 584.99 KiB
d4fa6bc 1.70 MiB 2.27 MiB 586.75 KiB
3565505 1.70 MiB 2.28 MiB 588.45 KiB
82e7c8f 1.70 MiB 2.27 MiB 584.80 KiB

sentry/src/main/java/io/sentry/SentryOptions.java Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@lbloder lbloder marked this pull request as ready for review February 8, 2024 11:14
@lbloder lbloder requested a review from adinauer February 9, 2024 07:26
# Conflicts:
#	CHANGELOG.md
# Conflicts:
#	CHANGELOG.md
# Conflicts:
#	CHANGELOG.md
#	sentry/src/main/java/io/sentry/SentryOptions.java
#	sentry/src/test/java/io/sentry/SentryOptionsTest.kt
@adinauer adinauer self-assigned this Feb 26, 2024
Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

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

forgot to send some comments

private @Nullable Long defaultFailureIssueThreshold;
private @Nullable Long defaultRecoveryThreshold;

public Cron(
Copy link
Member

Choose a reason for hiding this comment

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

m do we need this ctor? Adding new options will just start off a pyramid, so may be better to just skip this completely and rely on setters instead.

Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

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

LGTM

# Conflicts:
#	sentry/src/main/java/io/sentry/SentryOptions.java
@lbloder lbloder enabled auto-merge (squash) February 29, 2024 07:56
@lbloder lbloder merged commit a816b3f into main Feb 29, 2024
30 checks passed
@lbloder lbloder deleted the feat/cron-defaults branch February 29, 2024 07:58
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.

Crons - allow configuring defaults for monitor config
2 participants