380 likes | 521 Views
“Paranormal Tracktivity ”. Transparent instrumentation and software telemetry using GhostWriter. Norbert Sram. Who am I?. Norbert Sram Software engineer at AdNovum Member of application engineering. The importance of tracing!. Why tracing?.
E N D
“Paranormal Tracktivity” Transparent instrumentation and software telemetry using GhostWriter Norbert Sram
Who am I? • Norbert Sram • Software engineer at AdNovum • Member of application engineering
Why tracing?Because debuggers are not your best friend! Period.
“... for most of the real problems (...) a debugger doesn't much help. And the real problems are what I worry about. The rest is just details.“ • -- Linus Torvalds • "Debuggers are evil"
"The kinds of bugs I have to troubleshoot are easily isolated by my unit tests, and can be quickly found through inspection and a few judiciously placed print statements” • -- Robert C. Martin ("Uncle Bob") "Debuggers are a wasteful Timesink"
Why tracing?Because debuggers are not your best only friend!
Why not just use ...? • Categorization factors • Low or high level • Manual or automated • Runtime or compile time • Online service or standalone solution • Open source or proprietary • Is there a gap?
Popular solutions • High level • Automated and Manual • Runtime • Online • Closed • Low level • Automated • Online • Runtime • Closed ? • Low level • Automated and Manual • Compile time • Online and Offline • Open and Closed
Popular solutions • High level • Automated and Manual • Runtime • Online • Closed • Low level • Automated • Online • Runtime • Closed • Low level • Automated and Manual • Compile time • Online and Offline • Open and Closed
Requirements • Same performance profile • No boilerplate • Reuse existing logging API
JSR-269 + OpenJDK Magic annotation!
JSR-269 + OpenJDK • JSR-269 used for hooking • Internal OpenJDK API for everything else • Create tracing AST • Mold it into the AST of the compiled application JSR-269 GhostWriter OpenJDK
“Here be dragons” I’m not proud of this!
@AdnTrace- configuration by exception • Getting started with GhostWriter: • The two main factors: • Easier application to existing projects • Partial tracing is no longer an issue out of the box!
GhostWriter vs. Accidental Complexity We’ll never know what we did here…
GhostWriter vs. Accidental Complexity • Experimental feature: state tracing Unless we trace the initializations!
Ok. Nice. But how does tracing help me in a production environment?
GhostWriter in “Production Land” • Pareto principle applied to tracing: • Capture always, serialize and store in case of errors Detect and capture unhandled error Delegate to runtime
GhostWriter Runtime • Job of the runtime is to serialize and store the snapshots provided by the compile time component. • Simple extension point:
GhostWriter in the cloud • Look to the future! Support the handling of extensive amounts of tracing. GW - Runtime GW - Tracing
GhostWriter in the cloud • Look to the future! Support the handling of extensive amounts of tracing. … …
Impact on non-functional requirements • How does it affect my application? What if I pull the plug? • Determinism, resilience ... am I asking for too much?
Minimizing impact • Dedicated thread, fixed memory consumption, low latency • Isolated, compartmentalized runtimes
Are we there yet?Stable release planned for the end of this year.
Contributors:GáborGinterGyörgy KovácsNorbert SramPál Könyves