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
Visibility for web developers
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Bruno Renié
May 13, 2014
Technology
3
470
Visibility for web developers
Bruno Renié
May 13, 2014
Tweet
Share
More Decks by Bruno Renié
See All by Bruno Renié
Decentralization & real-time with PubSubHubbub
brutasse
1
160
Deployability of Python Web Applications
brutasse
17
2.4k
Stop writing settings files
brutasse
21
2.6k
Class-based Views: patterns and anti-patterns
brutasse
9
1.7k
Packager son projet Django
brutasse
4
580
Staticfiles : tout ce qu'il faut savoir, rien que ce qu'il faut savoir
brutasse
4
570
Introduction to Django
brutasse
3
440
Other Decks in Technology
See All in Technology
Introduction to Bill One Development Engineer
sansan33
PRO
0
380
OCI技術資料 : 外部接続 VPN接続 詳細
ocise
1
10k
Secure Boot 2026 - Aggiornamento dei certificati UEFI e piano di adozione in azienda
memiug
0
130
オンプレとGoogle Cloudを安全に繋ぐための、セキュア通信の勘所
waiwai2111
3
1.1k
Webアクセシビリティ技術と実装の実際
tomokusaba
0
200
Databricksアシスタントが自分で考えて動く時代に! エージェントモード体験もくもく会
taka_aki
0
300
Kiro のクレジットを使い切る!
otanikohei2023
0
110
メタデータ同期に潜んでいた問題 〜 Cache Stampede 時の Cycle Wait を⾒つけた話
lycorptech_jp
PRO
0
140
マネージャー版 "提案のレベル" を上げる
konifar
14
11k
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.1k
どこで打鍵するのが良い? IaCの実行基盤選定について
nrinetcom
PRO
2
150
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Done Done
chrislema
186
16k
What's in a price? How to price your products and services
michaelherold
247
13k
The Cult of Friendly URLs
andyhume
79
6.8k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
460
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
240
Side Projects
sachag
455
43k
First, design no harm
axbom
PRO
2
1.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Transcript
Visibility for Web Developers Bruno Renié Django Island 2014
Working with ops & support staff Large infrastructure, lots of
moving parts whoami: lead dev @ exoscale
People need to know what's going on, anytime Not everyone
is a developer SSH, grep and tail not acceptable
Goal: visibility on infrastructure & apps
Errors Events Metrics
Errors
Easy: use sentry
Great tool for developers, but… People also need to know
about things that are not broken
Events
Event == log call Timestamped information about something worth knowing
Easy to emit logs Searching on remote machines, not so
much
Centralized logging Agent forwards logs to an aggregator Aggregator stores
logs and provides a search interface
Aggregator Hosts logstash+elasticsearch kibana log shippers
Collecting logs rsyslog / syslog-ng logstash-forwarder (lumberjack) logstash
In Python logging.handlers.SyslogHandler
Centralizing isn't enough
A common way to log things import logging logger =
logging.getLogger(__name__) logger.info("user {} logged in".format(user.email))
Not much information No structure
Structured logging Record = set of key-value pairs event="user logged
in" user="
[email protected]
" ip="1.2.3.4"
In Python: pip install structlog Hynek Schlawack logger = structlog.get_logger()
logger.info("user logged in", user="
[email protected]
" ip="1.2.3.4") {"event": "user.login", "user": "
[email protected]
", "host": "1.2.3.4"}
Contextual loggers log = logger.bind(user=request.user.email) log.info("payment", amount=120, currency="CHF") {"event": "payment",
"user": "
[email protected]
", "amount": 120, "currency": "CHF"}
structlog JSON elasticsearch Rich data for building dashboards
Demo
Marketing: "Who signed up today?" Finance: "How much income in
the past week?" Support: "What did this user do in the past 24 hours?"
Events Centralize logs Add structure Profit logstash, elasticsearch structlog kibana
Metrics
Time series data Continuous, regular intervals Big player: graphite ecosystem
carbon whisper graphite
<identifier> <value> <timestamp> db1.load.midterm 4.6 1399842778 Measure at regular intervals,
send using the carbon line protocol echo " … " | nc host port
Traditional metrics stack agents collectd, apps, scripts carbon whisper graphite
ingests metrics stores metrics renders graphs
Counting and timing: statsd In-memory buffer Aggregates and flushes to
carbon at regular intervals
In Python pystatsd django-statsd-mozilla from stastd import StastClient statsd =
StatsClient() @statsd.timer("something") def expensive_computation(): # …
Graphing Graphite: rendering API (json / PNG / etc) Countless
dashboard apps Grafana Graph-explorer etc
Demo
What about alerts? Riemann: metrics hub/proxy App server overloaded, full
disk, etc Analyzes metrics computes aggregates notifies
Demo
we are hiring! Questions! @brutasse Image credits: http://en.wikipedia.org/wiki/Explosion
Resources Events Metrics structlog.org rsyslog logstash elasticsearch kibana carbon /
whisper graphite-api grafana collectd statsd riemann.io bernhard
Hosted services (not exhaustive) Logging Metrics Loggly Papertrail Hosted Graphite
Librato JSON / structured logging support?