Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Distributed Request Tracing
Search
Kenny Hoxworth
April 23, 2014
Programming
2
1k
Distributed Request Tracing
Overview of tracing in a distributed system from a Ruby / Rails perspective
Kenny Hoxworth
April 23, 2014
Tweet
Share
Other Decks in Programming
See All in Programming
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
870
Open source software: how to live long and go far
gaelvaroquaux
0
630
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
310
時計仕掛けのCompose
mkeeda
1
290
AWS Lambda functions with C# 用の Dev Container Template を作ってみた件
mappie_kochi
0
240
SwiftUI Viewの責務分離
elmetal
PRO
1
220
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.7k
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
SRE、開発、QAが協業して挑んだリリースプロセス改革@SRE Kaigi 2025
nealle
3
4.2k
TokyoR116_BeginnersSession1_環境構築
kotatyamtema
0
110
Software Architecture
hschwentner
6
2.1k
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
Featured
See All Featured
Writing Fast Ruby
sferik
628
61k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
GitHub's CSS Performance
jonrohan
1030
460k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Code Reviewing Like a Champion
maltzj
521
39k
BBQ
matthewcrist
86
9.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Transcript
DISTRIBUTED REQUEST TRACING
Kenny Hoxworth
Request Profiler Request Lifecycle (40ms) WebService (25ms) AuthService (15ms) DB
(3ms) Worker (13ms)
SMS Trace
SMS Trace
SMS Trace
Performance 500 ms
Bad Nodes
Cats as a service
Catspammer API web
Catspammer API AUTH PurrMQ Social Media Workers web
Catspammer API AUTH PurrMQ Social Media Workers web
Tracing done Right
Low Overhead Goal 1.
Scalable Goal 2.
Transparent Instrumentation Goal 3.
X-Trace, Magpie, Pinpoint
Request Lifecycle (40ms) WebService (25ms) AuthService (15ms) DB (3ms) Worker
(13ms) trace id
Request Lifecycle (40ms) WebService (25ms) AuthService (15ms) DB (3ms) Worker
(13ms) span id
Dapper
Dapper Architecture Instrumented Services Dapper Collectors Dapper UI
Zipkin
Zipkin Pluggable Datastore Scribe Collector Highly configurable
None
Zipkin Example
System Setup Zipkin
System Setup Zipkin $> git clone https://github.com/twitter/zipkin.git $> ./zipkin/bin/collector &
$> ./zipkin/bin/query & $> ./zipkin/bin/web &
Scribe Ruby Setup finagle-thrift zipkin-tracer
gemfile.rb gem 'scribe' gem 'finagle-thrift' gem 'zipkin-tracer', :git => ‘
[email protected]
:mszenher/zipkin-
tracer.git', :require => 'zipkin-tracer', :tag => 'v0.4.0'
config/initializers/zipkin.rb config = Rails.application.config ! zipkin_tracer_config = { service_name: 'catspammer',
service_port: 9410, sample_rate: 1, scribe_server: '127.0.0.1:9410' } ! config.middleware.use ZipkinTracer::RackHandler, zipkin_tracer_config
ActiveRecord? Redis? Trace.record(Trace::Annotation.new(Trace::Annotation::CLIENT_SEND, Trace.default_endpoint)) Trace.record(Trace::Annotation.new(Trace::Annotation::CLIENT_RECV, Trace.default_endpoint)) Cat.where(:fur => “orange”)
Demo
Questions?
catspammer.com
Thanks! @hoxworth :: http://github.com/hoxworth