feat(attributes): Add Android Runtime (ART) GC and memory attributes under runtime namespace#382
feat(attributes): Add Android Runtime (ART) GC and memory attributes under runtime namespace#382markushi wants to merge 4 commits into
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Bug Fixes 🐛Attributes
Other
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
I've split them into |
Add top-level runtime.* attributes mapping to the Sentry runtime context: runtime.name, runtime.version, runtime.build, and runtime.raw_description. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 11 new attributes under the `art` namespace for Android Runtime garbage collection stats and memory info, parsed from ANR thread dumps. GC attributes: gc_total_count, gc_total_time, gc_blocking_count, gc_blocking_time, gc_pre_oome_count, gc_waiting_time Memory attributes: free_memory, free_memory_until_gc, free_memory_until_oome, total_memory, max_memory Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename ART attribute keys to use dot-separated sub-namespaces, consistent with existing patterns like jvm.gc.*, jvm.memory.*, and browser.web_vital.*. GC attributes move under art.gc.* and memory attributes under art.memory.*, with a max nesting depth of 2 dots. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…espace Rename art.* attributes to runtime.art.* to nest them under the runtime context namespace. This aligns with the runtime context attribute structure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6265928 to
4ee2e0c
Compare
|
Moving back to draft for now, as we need to sort out the "runtime" vs. "process.runtime" discussion first. |
|
From what I can tell otel also prefers setting runtime specifics into its own namespace e.g
It looks like |
|
what do you think of this, I had 🤖 run through the GC and Memory attributes of OTEL runtime conventions to check how we can align with naming:
|
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>
Summary
Adds Android Runtime (ART) garbage collection and memory attributes for tracking GC activity and memory usage on Android, nested under the
runtime.*namespace.Depends on #383.
GC attributes (
runtime.art.gc.*)runtime.art.gc.blocking_count/runtime.art.gc.blocking_time— blocking (stop-the-world) GCruntime.art.gc.total_count/runtime.art.gc.total_time— all GC activityruntime.art.gc.waiting_time— time threads spent waiting for GCruntime.art.gc.pre_oome_count— last-resort GCs before OutOfMemoryErrorMemory attributes (
runtime.art.memory.*)runtime.art.memory.free— free memory available to the processruntime.art.memory.free_until_gc— free memory before GC would triggerruntime.art.memory.free_until_oome— free memory before OOMruntime.art.memory.total/runtime.art.memory.max— allocated and max memory