~/talk

The Adventurer’s Guide to Forking the Go Runtime

Talkat GopherCon UK 2023 · 2023-08-16..08-18· [go, distributed-systems]
links:none on file
slides:none on file

Creates a reproducible set of rolling patches applied to Go 1.20.7 that inject tracing into the runtime by adding a Trace field to the G struct and hooking goexit/gostart (goxat0/newproc1), plus small overlays for HTTP and database/sql. Uses go:linkname and unsafe to implement hooks outside the runtime, emits OpenTelemetry spans and sends to Jaeger, and traces outbound requests via Traceparent headers. Demo shows per-request tracing without app changes and expands a trace from ~6 spans to 27 spans, revealing DNS/TCP and driver internals.

AI-written summary · about

  1. 0:00Start
  2. 0:35WHAT'S OUR GOAL?
  3. 1:16FORKS
  4. 1:58SETTING UP OUR FORK
  5. 3:44CREATING OUR BUILD SCRIPT
  6. 4:29OUR FIRST PATCH
  7. 5:14A SIMPLE APP
  8. 5:40SOME GO INTERNALS
  9. 7:28RUNTIME/PROC.GO
  10. 9:04DEMO APPLICATION
  11. 10:56WHAT EXACTLY ARE WE GOING TO DO?
  12. 13:03GETTING OUR CODE COMPILING AGAIN
  13. 15:49TRACING REQUESTS
  14. 16:52PATCHING IT IN
  15. 19:08TRACEPARENT
  16. 20:12DESIGNING A SIMPLE SPAN API
  17. 21:19LET'S START RECORDING SPANS
  18. 22:50PATCH THE BASE QUERY FUNCTION
  19. 28:25WHAT ABOUT OTHER APPROACHES?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.