Commit e43f1a2
Profiling - Deduplication and cleanup (#4681)
* add readme and info about commit of the source repository
* delete jfr file on jvm exit
* further split into smaller methods
* deduplicate frames in order to save bandwidth, add converter tests
* remove Platform Enum, use string constants instead for compatibility with cross platform frameworks
* implement equals and hashcode for SentryStackFrame to make frame deduplication work
* bump api
* improve error handling, fix start stop start flow
* add new testfile
* calculate ticksPerNanosecond in constructor
* adapt Ratelimiter to check for both ProfileChunk and ProfileChunkUi ratelimiting
* update ratelimiter test to check for both profileChunk and profileChunkUi drops
* use string constant instead of string
* Format code
* add non aggregating event collector to send each event individually, deduplicate stacks
* adapt converter tests to new non-aggregated converter
* Format code
* add logging to loadProfileConverter
* Format code
* fix duplication of events
* catch all exception happening when converting from jfr
* add exists and writable info to log message
* add method to safely delete file
* remove setNative call
* fix test
* fix reference to commit we vendored from
* drop event if it cannot be processed to not lose the whole chunk
* make format
* fix test
* Format code
* Profiling - OTEL profiling fix, Stabilization, Logging (#4746)
* add skipProfiling flag to TransactionOptions to be able to skip profiling and handle cases where profiling has been started by otel
* add profilerId to spanContext so that otel span processor can propagate this to the exporter and SentryTracer
* immediately end profiling when stopProfiler is called
* bump api, fix android api 24 code
* catch all exception happening when converting from jfr
* simplify JavaContinuous profiler by catching AsyncProfiler instantiation exceptions in provider
* add exists and writable info to log message
* add method to safely delete file
* remove setNative call
* fix test
* fix reference to commit we vendored from
* drop event if it cannot be processed to not lose the whole chunk
* Format code
* fix test
* Format code
* fix test
* catch exceptions in startProfiler/stopProfiler
* fallback to threadId -1 if it cannot be resolved
---------
Co-authored-by: Sentry Github Bot <[email protected]>
---------
Co-authored-by: Sentry Github Bot <[email protected]>1 parent 8b7e489 commit e43f1a2
File tree
25 files changed
+702
-225
lines changed- sentry-android-core/src/main/java/io/sentry/android/core
- sentry-async-profiler
- api
- src
- main/java/io/sentry/asyncprofiler
- convert
- profiling
- provider
- vendor/asyncprofiler
- jfr
- test
- java/io/sentry/asyncprofiler
- convert
- profiling
- resources
- sentry-opentelemetry/sentry-opentelemetry-core/src/main/java/io/sentry/opentelemetry
- sentry
- api
- src
- main/java/io/sentry
- profiling
- protocol
- transport
- test/java/io/sentry
- transport
25 files changed
+702
-225
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
11 | 20 | | |
12 | 21 | | |
13 | 22 | | |
| |||
Lines changed: 100 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| 21 | + | |
18 | 22 | | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
23 | | - | |
| 28 | + | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
30 | 42 | | |
31 | 43 | | |
| 44 | + | |
32 | 45 | | |
33 | 46 | | |
34 | 47 | | |
35 | 48 | | |
36 | 49 | | |
37 | 50 | | |
38 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
39 | 57 | | |
40 | 58 | | |
41 | 59 | | |
42 | 60 | | |
43 | 61 | | |
44 | 62 | | |
| 63 | + | |
45 | 64 | | |
46 | 65 | | |
47 | 66 | | |
48 | 67 | | |
49 | 68 | | |
50 | 69 | | |
51 | 70 | | |
52 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
53 | 74 | | |
54 | 75 | | |
55 | 76 | | |
56 | 77 | | |
57 | 78 | | |
58 | 79 | | |
59 | | - | |
| 80 | + | |
60 | 81 | | |
61 | 82 | | |
62 | 83 | | |
63 | 84 | | |
| 85 | + | |
64 | 86 | | |
65 | 87 | | |
66 | 88 | | |
| |||
71 | 93 | | |
72 | 94 | | |
73 | 95 | | |
| 96 | + | |
74 | 97 | | |
75 | 98 | | |
76 | 99 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
85 | 104 | | |
86 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
87 | 109 | | |
88 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
89 | 114 | | |
90 | 115 | | |
91 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
92 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
93 | 127 | | |
94 | 128 | | |
95 | 129 | | |
| |||
103 | 137 | | |
104 | 138 | | |
105 | 139 | | |
106 | | - | |
107 | | - | |
108 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
109 | 175 | | |
110 | 176 | | |
111 | 177 | | |
112 | 178 | | |
113 | 179 | | |
114 | 180 | | |
115 | 181 | | |
116 | | - | |
| 182 | + | |
117 | 183 | | |
118 | 184 | | |
119 | 185 | | |
120 | 186 | | |
121 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
122 | 197 | | |
123 | | - | |
124 | | - | |
| 198 | + | |
| 199 | + | |
125 | 200 | | |
126 | 201 | | |
127 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
128 | 206 | | |
129 | 207 | | |
130 | 208 | | |
| |||
176 | 254 | | |
177 | 255 | | |
178 | 256 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | 257 | | |
198 | 258 | | |
199 | 259 | | |
200 | 260 | | |
201 | 261 | | |
202 | 262 | | |
203 | 263 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | 264 | | |
211 | 265 | | |
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments