You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This moves checking profiler setup from configuration writers to a new method called validate that is called automatically in Sentry.init after its done setting up configuration instance.
There's also a handy new method for defining simple validations for Configuration:
The benefit here is that we can validate values that actually need other values in order to be validated, or to perform additional checks like if a 3rd-party dependency is available.
Previously it was not possible because in the moment of validation the configuration was not completed.
@sl0thentr0py@st0012 what do you think about this approach? If you could give me a 👍🏻 I'd love to continue and make a tiny API for defining validations for our settings so that we can have it work consistently for all values. Seems like a nice improvement and it'd fix the issue we're facing with profiler setup.
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
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.
This moves checking profiler setup from configuration writers to a new method called
validatethat is called automatically inSentry.initafter its done setting up configuration instance.There's also a handy new method for defining simple validations for Configuration:
The benefit here is that we can validate values that actually need other values in order to be validated, or to perform additional checks like if a 3rd-party dependency is available.
Previously it was not possible because in the moment of validation the configuration was not completed.
Closes #2534