Merged
Conversation
7 tasks
Contributor
|
Contributor
Performance metrics 🚀
|
lbloder
reviewed
Sep 3, 2024
| private @NotNull ScopeType defaultScopeType = ScopeType.ISOLATION; | ||
|
|
||
| private @NotNull InitPriority initPriority = InitPriority.MEDIUM; | ||
| private boolean forceInit = false; |
Collaborator
There was a problem hiding this comment.
To be consistent with the other fields in SentryOptions maybe add a new line in between.
Also these might warrant a JavaDoc description with a short explainer what they're used for
| */ | ||
| private SentryOptions(final boolean empty) { | ||
| if (!empty) { | ||
| setInitPriority(InitPriority.LOWEST); |
Collaborator
There was a problem hiding this comment.
Shouldn't we keep the default when creating new SentryOptions?
Member
Author
There was a problem hiding this comment.
Was intended differently, let's remove this.
Collaborator
There was a problem hiding this comment.
Maybe add a test here for the default value of InitPriority:
@Test
fun `when options is initialized, InitPriority is set to MEDIUM by default`() {
assertEquals(SentryOptions().initPriority, InitPriority.MEDIUM)
}
|
|
||
| class InitUtilTest { | ||
|
|
||
| var previousOptions: SentryOptions? = null |
Collaborator
There was a problem hiding this comment.
These could be private.
Also, should we re-init them for each test with @Before?
markushi
approved these changes
Sep 9, 2024
54 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Sometimes Sentry.init is called multiple times, these settings allow us to control which call to init takes priority.
💡 Motivation and Context
Support different re-init scenarios as well as init calls coming from multiple integrations (e.g. OTel Agent, Logging Integration, Spring Boot)
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps