38
“Paranormal Tracktivity” Transparent instrumentation and software telemetry using GhostWriter Norbert Sram

“Paranormal Tracktivity ”

Embed Size (px)

DESCRIPTION

“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?. - PowerPoint PPT Presentation

Citation preview

Page 1: “Paranormal  Tracktivity ”

“Paranormal Tracktivity”Transparent instrumentation and software telemetry using GhostWriter

Norbert Sram

Page 2: “Paranormal  Tracktivity ”

2

Who am I?

Norbert Sram Software engineer at AdNovum Member of application engineering

Page 3: “Paranormal  Tracktivity ”

3

The importance of tracing!

Page 4: “Paranormal  Tracktivity ”

4

Why tracing?

Page 5: “Paranormal  Tracktivity ”

5

Why tracing?Because debuggers are not your best

friend! Period.

Page 6: “Paranormal  Tracktivity ”

6

“... 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"

Page 7: “Paranormal  Tracktivity ”

7

"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"

Page 8: “Paranormal  Tracktivity ”

8

Why tracing?Because debuggers are not your best only

friend!

Page 9: “Paranormal  Tracktivity ”

9

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?

Page 10: “Paranormal  Tracktivity ”

10

?

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

Page 11: “Paranormal  Tracktivity ”

11

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

Page 12: “Paranormal  Tracktivity ”

12

How did we get here?

Page 13: “Paranormal  Tracktivity ”

13

Page 14: “Paranormal  Tracktivity ”

14

Page 15: “Paranormal  Tracktivity ”

15

Page 16: “Paranormal  Tracktivity ”

16

Partial tracing is not tracing!

Page 17: “Paranormal  Tracktivity ”

17

Requirements

Same performance profile No boilerplate Reuse existing logging API

Page 18: “Paranormal  Tracktivity ”

18

No source mangling!

Page 19: “Paranormal  Tracktivity ”

19

JSR-269 + OpenJDK

Magic annotation!

Page 20: “Paranormal  Tracktivity ”

20

We reached our goals! … or did we?

Page 21: “Paranormal  Tracktivity ”

21

Page 22: “Paranormal  Tracktivity ”

22

JSR-269 + OpenJDK

JSR-269 used for hookingInternal OpenJDK API for everything else• Create tracing AST• Mold it into the AST of the compiled application

GhostWriter

OpenJDK

JSR-269

Page 23: “Paranormal  Tracktivity ”

23

“Here be dragons”

I’m not proud of this!

Page 24: “Paranormal  Tracktivity ”

24

@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!

Page 25: “Paranormal  Tracktivity ”

25

GhostWriter vs. Accidental Complexity

We’ll never know what we did here…

Page 26: “Paranormal  Tracktivity ”

26

GhostWriter vs. Accidental Complexity

Experimental feature: state tracing

Unless we trace the initializations!

Page 27: “Paranormal  Tracktivity ”

27

Ok. Nice. But how does tracing help me in a production environment?

Page 28: “Paranormal  Tracktivity ”

28

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

Page 29: “Paranormal  Tracktivity ”

29

GhostWriter Runtime

Job of the runtime is to serialize and store the snapshots provided by the compile time component.

Simple extension point:

Page 30: “Paranormal  Tracktivity ”

30

GhostWriter in the cloud

Look to the future! Support the handling of extensive amounts of tracing.

GW - Runtime GW - Tracing

Page 31: “Paranormal  Tracktivity ”

31

GhostWriter in the cloud

Look to the future! Support the handling of extensive amounts of tracing.

… …

Page 32: “Paranormal  Tracktivity ”

32

Impact on non-functional requirementsHow does it affect my application? What if I pull the plug?

Determinism, resilience ... am I asking for too much?

Page 33: “Paranormal  Tracktivity ”

33

Minimizing impact

Dedicated thread, fixed memory consumption, low latency

Isolated, compartmentalized runtimes

Page 34: “Paranormal  Tracktivity ”

34

“Use the source, Luke!”ghostwriter.io

Page 35: “Paranormal  Tracktivity ”

35

Are we there yet?Stable release planned for the end of this

year.

Page 36: “Paranormal  Tracktivity ”

36

Demo:Bootstrapping GhostWriter

Page 37: “Paranormal  Tracktivity ”

37

Contributors:Gábor Ginter

György KovácsNorbert SramPál Könyves

Page 38: “Paranormal  Tracktivity ”

38

Thank you for your attention!