Skip to content

Commit 1493734

Browse files
markushiclaude
andcommitted
Align ArtContext JSON keys with sentry-conventions
Use dotted attribute names (e.g. gc.total_count, memory.free) to match the sentry-conventions schema from getsentry/sentry-conventions#382. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c8f560d commit 1493734

3 files changed

Lines changed: 33 additions & 33 deletions

File tree

sentry/src/main/java/io/sentry/protocol/ArtContext.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,17 @@ public int hashCode() {
201201
// region JsonSerializable
202202

203203
public static final class JsonKeys {
204-
public static final String GC_TOTAL_COUNT = "gc_total_count";
205-
public static final String GC_TOTAL_TIME = "gc_total_time";
206-
public static final String GC_BLOCKING_COUNT = "gc_blocking_count";
207-
public static final String GC_BLOCKING_TIME = "gc_blocking_time";
208-
public static final String GC_PRE_OOME_COUNT = "gc_pre_oome_count";
209-
public static final String GC_WAITING_TIME = "gc_waiting_time";
210-
public static final String FREE_MEMORY = "free_memory";
211-
public static final String FREE_MEMORY_UNTIL_GC = "free_memory_until_gc";
212-
public static final String FREE_MEMORY_UNTIL_OOME = "free_memory_until_oome";
213-
public static final String TOTAL_MEMORY = "total_memory";
214-
public static final String MAX_MEMORY = "max_memory";
204+
public static final String GC_TOTAL_COUNT = "gc.total_count";
205+
public static final String GC_TOTAL_TIME = "gc.total_time";
206+
public static final String GC_BLOCKING_COUNT = "gc.blocking_count";
207+
public static final String GC_BLOCKING_TIME = "gc.blocking_time";
208+
public static final String GC_PRE_OOME_COUNT = "gc.pre_oome_count";
209+
public static final String GC_WAITING_TIME = "gc.waiting_time";
210+
public static final String FREE_MEMORY = "memory.free";
211+
public static final String FREE_MEMORY_UNTIL_GC = "memory.free_until_gc";
212+
public static final String FREE_MEMORY_UNTIL_OOME = "memory.free_until_oome";
213+
public static final String TOTAL_MEMORY = "memory.total";
214+
public static final String MAX_MEMORY = "memory.max";
215215
}
216216

217217
@Override
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"gc_total_count": 1,
3-
"gc_total_time": 11.807,
4-
"gc_blocking_count": 1,
5-
"gc_blocking_time": 11.873,
6-
"gc_pre_oome_count": 0,
7-
"gc_waiting_time": 8.054,
8-
"free_memory": 3181568,
9-
"free_memory_until_gc": 3181568,
10-
"free_memory_until_oome": 196083712,
11-
"total_memory": 7774208,
12-
"max_memory": 201326592
2+
"gc.total_count": 1,
3+
"gc.total_time": 11.807,
4+
"gc.blocking_count": 1,
5+
"gc.blocking_time": 11.873,
6+
"gc.pre_oome_count": 0,
7+
"gc.waiting_time": 8.054,
8+
"memory.free": 3181568,
9+
"memory.free_until_gc": 3181568,
10+
"memory.free_until_oome": 196083712,
11+
"memory.total": 7774208,
12+
"memory.max": 201326592
1313
}

sentry/src/test/resources/json/contexts.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
},
2020
"art":
2121
{
22-
"gc_total_count": 1,
23-
"gc_total_time": 11.807,
24-
"gc_blocking_count": 1,
25-
"gc_blocking_time": 11.873,
26-
"gc_pre_oome_count": 0,
27-
"gc_waiting_time": 8.054,
28-
"free_memory": 3181568,
29-
"free_memory_until_gc": 3181568,
30-
"free_memory_until_oome": 196083712,
31-
"total_memory": 7774208,
32-
"max_memory": 201326592
22+
"gc.total_count": 1,
23+
"gc.total_time": 11.807,
24+
"gc.blocking_count": 1,
25+
"gc.blocking_time": 11.873,
26+
"gc.pre_oome_count": 0,
27+
"gc.waiting_time": 8.054,
28+
"memory.free": 3181568,
29+
"memory.free_until_gc": 3181568,
30+
"memory.free_until_oome": 196083712,
31+
"memory.total": 7774208,
32+
"memory.max": 201326592
3333
},
3434
"browser":
3535
{

0 commit comments

Comments
 (0)