Allow profiler to start before SDK and transaction is initialized #1778
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.
In plain PHP this is less interesting but in frameworks it can be very.
This allow you to drop a
\Sentry\Profiling\Profiler::startProfiling()
right after the composer autoloader which enable you to start profiling as early as possible capturing the bootstrap of the framework too.If we later know we are going to discard the transaction we discard the profiling data, if we are sampling the transaction we continue to use the already started (excimer) profiler as normal.
CI failure because: #1777