Both Dapper and Tracelytics borrow ideas from the X-Trace project, which has a bit of source available, though not much.
You can also use it as a resume.
It's a pity that there's nothing open source like the Tracelytics SaaS out there.
While it may be OK for a large company to build a full stack, not everyone can afford to build a full stack (write the web app, the monitoring suite, deployment, etc).