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

Report active Spring profiles in envelope item context #4147

Merged
merged 19 commits into from
Feb 20, 2025

Conversation

lcian
Copy link
Member

@lcian lcian commented Feb 7, 2025

📜 Description

Adds an EventProcessor that attaches the list of active Spring profiles (empty list if only the default profile is active) to all sent envelope items.
This information is set as data on a new dedicated Spring Context.

💡 Motivation and Context

Part of #4041

💚 How did you test it?

Unit tests to check that the EventProcessor is registered and that it behaves correctly, tested context application and serialization as well.

📝 Checklist

  • 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.
  • I updated the wizard 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.

@lcian
Copy link
Member Author

lcian commented Feb 7, 2025

To do:

  • add the feature to sentry-spring and sentry-spring-jakarta
  • tests for sentry-spring and sentry-spring-jakarta
  • manual testing with samples

@lcian lcian requested a review from adinauer February 7, 2025 10:20
Copy link
Contributor

github-actions bot commented Feb 7, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 320.19 ms 371.02 ms 50.83 ms
Size 1.58 MiB 2.21 MiB 641.23 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
c2c78de 415.28 ms 505.08 ms 89.80 ms

App size

Revision Plain With Sentry Diff
c2c78de 1.58 MiB 2.21 MiB 640.27 KiB

Previous results on branch: lcian/feat/spring-profiles-event-processor

Startup times

Revision Plain With Sentry Diff
54ac109 333.18 ms 348.02 ms 14.84 ms
d540247 464.38 ms 593.02 ms 128.65 ms
12e93c1 407.22 ms 476.87 ms 69.65 ms
215857b 419.24 ms 487.28 ms 68.03 ms
512c940 356.00 ms 456.39 ms 100.39 ms

App size

Revision Plain With Sentry Diff
54ac109 1.58 MiB 2.21 MiB 641.26 KiB
d540247 1.58 MiB 2.21 MiB 640.28 KiB
12e93c1 1.58 MiB 2.21 MiB 640.27 KiB
215857b 1.58 MiB 2.21 MiB 641.26 KiB
512c940 1.58 MiB 2.21 MiB 640.27 KiB

@lcian lcian force-pushed the lcian/feat/spring-profiles-event-processor branch from cf900cb to 4befd05 Compare February 11, 2025 15:38
@lcian lcian force-pushed the lcian/feat/spring-profiles-event-processor branch from e9dbace to 49de0d7 Compare February 11, 2025 15:43
@lcian lcian marked this pull request as ready for review February 11, 2025 15:54
@lcian lcian changed the title Report active Spring profiles in trace context Report active Spring profiles in event context Feb 18, 2025
@lcian lcian requested a review from adinauer February 18, 2025 09:13
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!

@lcian lcian enabled auto-merge (squash) February 20, 2025 08:21
@lcian lcian disabled auto-merge February 20, 2025 08:21
@lcian lcian changed the title Report active Spring profiles in event context Report active Spring profiles in envelope item context Feb 20, 2025
@lcian lcian enabled auto-merge (squash) February 20, 2025 08:22
@lcian lcian merged commit 32212cd into main Feb 20, 2025
37 checks passed
@lcian lcian deleted the lcian/feat/spring-profiles-event-processor branch February 20, 2025 08:32
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.

2 participants