Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tracing Node.js - The Open Source Edition

Tracing Node.js - The Open Source Edition

Node alone doesn’t guarantee flawless code execution with stellar performance and finding problems in distributed systems is hard.

Tracing gives you both visibility into distributed code execution and the data you need to optimize performance and remove flaws in your code.

This deck covers

- the key performance metrics and how to collect them from Node.js
- challenges of asynchronous tracing and content propagation
- the different Open Source approaches and their use cases
- an end-to-end live sample that shows you how to get started with tracing your apps today

Avatar for Daniel Khan

Daniel Khan

November 18, 2018

Other Decks in Programming

Transcript

  1. Daniel Khan / @dkhan Metrics Collection Pipeline Metrics Agent StatsD


    
 appmetrics-statsd
 express-statsd Timeseries DB Aggregated Metrics InfluxDB Dashboarding Query Grafana Metrics Collector Metrics Telegraf (UDP)
  2. Daniel Khan / @dkhan Event Loop Latency How long does

    a callback wait to be executed. setTimeout(foo, 1000) 0 1000 Latency Execution
  3. Daniel Khan / @dkhan Heap Usage How much memory does

    my application consume over time Code Segment Heap Reserved Heap Used Resident Set
  4. Daniel Khan / @dkhan GC Duration How often and how

    long does the Garbage Collector run
  5. Daniel Khan / @dkhan CPU Usage How much time does

    my application consume System Process
  6. Daniel Khan / @dkhan Memory Usage GC Duration Event Loop

    Latency Response Time Number of Requests CPU Usage 1 2 3 4 5
  7. Daniel Khan / @dkhan Memory Usage GC Duration Event Loop

    Latency Response Time Number of Requests CPU Usage
  8. Daniel Khan / @dkhan Tracing Transactions Span A Span B

    Span G Trace Span C Span D Span E Span F Trace Context: Trace ID, Parent ID, Span ID Metadata: HTTP Status Code, Response Time, … Trace Context Trace Context Trace Context Trace Context Trace Context ☠
  9. Daniel Khan / @dkhan Node.js Context Propagation HTTP Request http.get

    Context? HTTP Request HTTP Request mongoose.find callback(err, res) http.get callback Global context Global context Global context
  10. Daniel Khan / @dkhan Open Source driven by Google Provides

    Full Instrumentation Exporters to various UI / Backends
  11. Daniel Khan / @dkhan Open Source based out of Twitter

    Provides Full Instrumentation Provides UI
  12. Daniel Khan / @dkhan Open Source by Uber Provides a

    full backend and UI Can ingest von various sources Provides generic client libraries based on OpenTracing
  13. Confidential confidential 54 Exporter Ingest Binding Display OpenTracing OpenCensus Zipkin

    Tracer Header B3 B3 (TraceContext) (TraceContext) SpanContext B3
  14. Daniel Khan / @dkhan @dkhan ¡Hasta la vista ,❤! Try

    out Dynatrace for free
 dynatrace.com/trial