Repository navigation
fix(profiling): Accept dots in the JVM profiling traces dir path - #6334
Open
runningcode wants to merge 2 commits into
Open
runningcode wants to merge 2 commits into
runningcode wants to merge 2 commits into
Conversation
📲 Install BuildsAndroid
|
JavaContinuousProfiler refused any traces directory whose path held one of 26 characters, including ".", so a cache dir like /home/app/.sentry or /opt/my.app logged "Disabling profiling". async-profiler only treats "," (its argument separator) and "%" (file name patterns) specially, so those are the only characters it still rejects. The check also only stopped the first start: init() marked itself done before validating and returned true from then on, so later starts went ahead with the rejected options. It now remembers the result, as the Android profiler does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
runningcode
force-pushed
the
no/fix-profiler-traces-dir-validation
branch
from
November 3, 2026 14:41
bc5ff49 to
e60d94e
Compare
runningcode
marked this pull request as ready for review
November 3, 2026 14:44
runningcode
requested review from
0xadam-brown and
markushi
and removed request for
a team
November 3, 2026 14:44
This branch has not been deployed
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
So my agent discovered this because it was running the tests in a
.workflowdirectory. Weird that we reject directories with certain names. If anyone knows the history on this, please comment!Otherwise this fixes that and another issue in how
JavaContinuousProfilerchecks the profiling traces directory.Certain characters like
.no longer disable profiling. The profiler refused any traces directory whose path contained one of 26 characters,.among them. A cache dir like/home/app/.sentryor/opt/my.app/cachelogged "Disabling profiling because traces directory path contains invalid character: .". async-profiler only treats two characters in the path specially:,separates its arguments (start,jfr,...,file=<path>);%starts a file-name pattern such as%por%{ENV}.So those two are all it rejects now. The rest were never special: no shell runs the command, and async-profiler only splits
key=valueat the first=.A rejected config now stays rejected.
init()marked itself done before it checked the options and returnedtrueon every later call. So only the first start was refused, and later starts went ahead with the same options, despite the "Disabling profiling" warning. It now remembers the result, asAndroidContinuousProfilerdoes.Sentry.initcreates the traces directory before it builds the profiler, so nothing can make the options valid after the first start.💡 Motivation and Context
Found while moving around our tests. Any checkout whose path has a dot, such as a worktree under
.claude/worktrees/, fails because the fixture's relativetmpcache dir resolves to an absolute path.💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None.
🤖 Generated with Claude Code