Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f32782c
wip
lbloder Apr 25, 2025
4fd36d2
Merge branch 'main' into feat/poc-continuous-profiling
lbloder May 19, 2025
0e2a1b7
re-add data category profile_chunk, fix json naming, new converter ba…
lbloder May 19, 2025
558ff79
read java thread ids from jfr and use those instead of os thread ids,…
lbloder Jun 16, 2025
04c82de
adhere to sentry conventions re format null safety etc, fix compilation
lbloder Jun 23, 2025
f44e7fd
add profile-session-sample-rate to external options
lbloder Jun 24, 2025
8b4c71a
add platform as constructor param to ProfileChunk, wip: set java cont…
lbloder Jun 24, 2025
a44287b
add doubleToBigDecimal in JfrSample and ProfileChunk, same as we do i…
lbloder Jul 1, 2025
0b39f7e
Merge branch 'main' into feat/poc-continuous-profiling
lbloder Jul 7, 2025
9cf7ef6
rename JfrProfile to SentryProfile
lbloder Jul 8, 2025
5534204
move java profiling into its own module, load using SPI
lbloder Jul 8, 2025
cabc384
[WIP] use getProfilingTracesDirPath
lbloder Jul 11, 2025
ec59901
add missing build.gradle.kts for profiler module
lbloder Jul 11, 2025
54c3a8f
Merge branch 'main' into feat/poc-continuous-profiling
lbloder Jul 11, 2025
543fc40
WIP continuous profiling in trace mode
lbloder Jul 11, 2025
fba1881
cleanup unused classes from vendor, cleanup packages
lbloder Jul 15, 2025
55df61c
allow setting profiling-traces-dir-path independently from cache dir …
lbloder Jul 15, 2025
9bcd4ea
use profileChunk.platform to decide how to deal with the chunk instea…
lbloder Jul 15, 2025
3f83146
port relevant AndroidContinuousProfilerTest tests to JavaContinuousPr…
lbloder Jul 15, 2025
4a7403a
add service loader tests for profiler and profile converter
lbloder Jul 15, 2025
03a20dd
remove old jfr test files
lbloder Jul 15, 2025
8a02f7b
Merge branch 'main' into feat/poc-continuous-profiling
lbloder Aug 5, 2025
642b213
Merge branch 'main' into feat/poc-continuous-profiling
lbloder Sep 12, 2025
6d11c36
Merge branch 'main' into feat/poc-continuous-profiling
lbloder Sep 22, 2025
9d71686
Merge branch 'main' into feat/poc-continuous-profiling
lbloder Sep 26, 2025
1f73970
Merge branch 'main' into feat/poc-continuous-profiling
lbloder Sep 26, 2025
3acbd63
Support ProfileLifecycle.TRACE (#4576)
lbloder Sep 26, 2025
1e998bd
change profiler api from Path to String to keep Android Api 21 compat…
lbloder Sep 29, 2025
7cc9386
Merge branch 'main' into feat/poc-continuous-profiling
lbloder Sep 29, 2025
0c93c2b
mark all profiling related classes as internal
lbloder Sep 29, 2025
b39bb60
Merge branch 'feat/poc-continuous-profiling' of github.com:getsentry/…
lbloder Sep 29, 2025
c404b77
Format code
getsentry-bot Sep 29, 2025
3d93ba0
mark Sentry profile classes internal
lbloder Sep 29, 2025
92b2812
Merge branch 'feat/poc-continuous-profiling' of github.com:getsentry/…
lbloder Sep 29, 2025
1321c03
Format code
getsentry-bot Sep 29, 2025
2298748
mark SentryThreadMetadata internal
lbloder Sep 30, 2025
8e027d8
Merge branch 'feat/poc-continuous-profiling' of github.com:getsentry/…
lbloder Sep 30, 2025
7d29d34
Merge branch 'main' into feat/poc-continuous-profiling
lbloder Sep 30, 2025
9a11e02
add changelog entry
lbloder Sep 30, 2025
e5ffefb
Format code
getsentry-bot Sep 30, 2025
b065ef1
re-add asyncprofiler classes, cr changes
lbloder Sep 30, 2025
13dbc8e
bump api
lbloder Sep 30, 2025
40c6756
Merge branch 'feat/poc-continuous-profiling' of github.com:getsentry/…
lbloder Sep 30, 2025
91e244d
detect dangerous/invalid chars in profiling directory name
lbloder Sep 30, 2025
81ad659
Merge branch 'main' into feat/poc-continuous-profiling
lbloder Sep 30, 2025
66413a0
ignore vendored profile conversion code in codecov
lbloder Sep 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
detect dangerous/invalid chars in profiling directory name
  • Loading branch information
lbloder committed Sep 30, 2025
commit 91e244d62d6c89951481a30f4f6c2b9c71a8f9e7
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private boolean isInvalidDirectory() {
logger.log(
SentryLevel.WARNING,
"Disabling profiling because traces directory path contains invalid character: %s",
filename);
invalidChar);
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class JavaContinuousProfilerTest {
// Profiler doesn't start if the folder doesn't exists.
// Usually it's generated when calling Sentry.init, but for tests we can create it manually.

fixture.options.cacheDirPath = "."
fixture.options.cacheDirPath = "tmp"
File(fixture.options.profilingTracesDirPath!!).mkdirs()

Sentry.setCurrentScopes(fixture.scopes)
Expand Down Expand Up @@ -406,6 +406,21 @@ class JavaContinuousProfilerTest {
.log(eq(SentryLevel.WARNING), eq("SDK is rate limited. Stopping profiler."))
}

@Test
fun `profiler does not start when filename contains invalid characters`() {
val profiler = fixture.getSut { it.profilingTracesDirPath = "," }

profiler.startProfiler(ProfileLifecycle.MANUAL, fixture.mockTracesSampler)
assertFalse(profiler.isRunning)
assertEquals(SentryId.EMPTY_ID, profiler.profilerId)
verify(fixture.mockLogger)
.log(
eq(SentryLevel.WARNING),
eq("Disabling profiling because traces directory path contains invalid character: %s"),
eq(","),
)
}

fun withMockScopes(closure: () -> Unit) =
Mockito.mockStatic(Sentry::class.java).use {
it.`when`<Any> { Sentry.getCurrentScopes() }.thenReturn(fixture.scopes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ class ContinuousProfilerStub() : IContinuousProfiler {
override fun getProfilerId(): SentryId {
TODO("Not yet implemented")
}

override fun getChunkId(): SentryId {
TODO("Not yet implemented")
}
}
Loading