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
Bruno Renié
May 13, 2014
Technology
3
440
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
150
Deployability of Python Web Applications
brutasse
17
2.3k
Stop writing settings files
brutasse
21
2.6k
Class-based Views: patterns and anti-patterns
brutasse
9
1.6k
Packager son projet Django
brutasse
4
560
Staticfiles : tout ce qu'il faut savoir, rien que ce qu'il faut savoir
brutasse
4
540
Introduction to Django
brutasse
3
410
Other Decks in Technology
See All in Technology
AI Engineering Summit Pre Event LT #10
okaru
2
550
型システムを知りたい人のための型検査器作成入門
mame
14
3.4k
今からでも間に合う! 生成AI「RAG」再入門 / Re-introduction to RAG in Generative AI
hideakiaoyagi
1
140
ハッカー視点で学ぶサイバー攻撃と防御の基本
nomizone
2
1.4k
上長や社内ステークホルダーに対する解像度を上げて、より良い補完関係を築く方法 / How-to-increase-resolution-and-build-better-complementary-relationships-with-your-bosses-and-internal-stakeholders
madoxten
13
6.9k
Vibe Codingの裏で、 考える力をどう取り戻すか
csekine
2
630
脅威をモデリングしてMCPのセキュリティ対策を考えよう
flatt_security
4
1.1k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
7.1k
バクラクのモノレポにおける AI Coding のための環境整備と {Roo,Claude} Code活用事例 / AI Coding in Bakuraku's Monorepo: Environment Setup & Case Studies with {Roo, Claude} Code
upamune
8
5.4k
AWS Lambdaでサーバレス設計を学ぼう_ベンダーロックインの懸念を超えて-サーバレスの真価を探る
fukuchiiinu
4
960
Snowflake Intelligenceで実現できるノーコードAI活用
takumimukaiyama
1
150
Monorepo Error Management: Automated Runbooks and Team-Targeted Alert Distribution
biwashi
1
140
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Facilitating Awesome Meetings
lara
54
6.4k
Speed Design
sergeychernyshev
30
980
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
It's Worth the Effort
3n
184
28k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
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="test@example.com" ip="1.2.3.4"
In Python: pip install structlog Hynek Schlawack logger = structlog.get_logger()
logger.info("user logged in", user="test@example.com" ip="1.2.3.4") {"event": "user.login", "user": "test@example.com", "host": "1.2.3.4"}
Contextual loggers log = logger.bind(user=request.user.email) log.info("payment", amount=120, currency="CHF") {"event": "payment",
"user": "test@example.com", "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?