Skip to content

Resolve spring properties in @SentryCheckIn annotation#3194

Merged
lbloder merged 10 commits into
mainfrom
feat/resolve-spring-props-checkin
Feb 19, 2024
Merged

Resolve spring properties in @SentryCheckIn annotation#3194
lbloder merged 10 commits into
mainfrom
feat/resolve-spring-props-checkin

Conversation

@lbloder

@lbloder lbloder commented Feb 6, 2024

Copy link
Copy Markdown
Collaborator

📜 Description

Allow for dynamic monitor slugs in @SentryCheckIn annotation by resolving spring properties as well as raw strings.
Now it is possible to do @SentryCheckin("${my.property}") with my.property being replaced by spring.

💡 Motivation and Context

Fixes #3191

💚 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

@github-actions

github-actions Bot commented Feb 6, 2024

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

Generated by 🚫 dangerJS against 1806c45

@github-actions

github-actions Bot commented Feb 6, 2024

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 363.31 ms 469.22 ms 105.92 ms
Size 1.70 MiB 2.27 MiB 586.31 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
93a76ca 381.08 ms 459.22 ms 78.14 ms
b7fa26f 440.10 ms 533.98 ms 93.88 ms
1f3652d 367.21 ms 438.46 ms 71.25 ms
86f0096 368.63 ms 446.92 ms 78.29 ms
7eccfdb 389.94 ms 461.29 ms 71.35 ms
d6d2b2e 392.55 ms 467.50 ms 74.95 ms
d6d2b2e 463.14 ms 545.56 ms 82.42 ms
c7e2fbc 372.00 ms 461.71 ms 89.71 ms
8838e01 387.41 ms 467.00 ms 79.59 ms
eecfab6 399.27 ms 461.82 ms 62.55 ms

App size

Revision Plain With Sentry Diff
93a76ca 1.72 MiB 2.29 MiB 576.75 KiB
b7fa26f 1.70 MiB 2.27 MiB 583.82 KiB
1f3652d 1.72 MiB 2.27 MiB 554.95 KiB
86f0096 1.72 MiB 2.29 MiB 576.50 KiB
7eccfdb 1.72 MiB 2.27 MiB 556.93 KiB
d6d2b2e 1.72 MiB 2.27 MiB 555.05 KiB
d6d2b2e 1.72 MiB 2.27 MiB 555.05 KiB
c7e2fbc 1.72 MiB 2.29 MiB 576.40 KiB
8838e01 1.72 MiB 2.29 MiB 578.15 KiB
eecfab6 1.72 MiB 2.27 MiB 558.56 KiB

Previous results on branch: feat/resolve-spring-props-checkin

Startup times

Revision Plain With Sentry Diff
0ea3997 427.34 ms 457.58 ms 30.24 ms
a0d22c6 401.86 ms 493.76 ms 91.90 ms
617ebd3 438.64 ms 530.44 ms 91.80 ms

App size

Revision Plain With Sentry Diff
0ea3997 1.70 MiB 2.27 MiB 584.64 KiB
a0d22c6 1.70 MiB 2.27 MiB 584.64 KiB
617ebd3 1.70 MiB 2.27 MiB 584.64 KiB

Comment thread sentry-spring/src/main/java/io/sentry/spring/checkin/SentryCheckInAdvice.java Outdated
Comment thread sentry-spring/src/test/kotlin/io/sentry/spring/SentryCheckInAdviceTest.kt Outdated
lbloder and others added 4 commits February 7, 2024 13:20
…heckin/SentryCheckInAdvice.java

Co-authored-by: Alexander Dinauer <[email protected]>
…try/sentry-java into feat/resolve-spring-props-checkin

# Conflicts:
#	sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/checkin/SentryCheckInAdvice.java
@lbloder
lbloder requested a review from adinauer February 9, 2024 07:26
@lbloder
lbloder merged commit d007225 into main Feb 19, 2024
@lbloder
lbloder deleted the feat/resolve-spring-props-checkin branch February 19, 2024 08:30
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.

Resolve spring expressions in @SentryCheckIn

4 participants