Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Visibility for web developers

Visibility for web developers

Bruno Renié

May 13, 2014
Tweet

More Decks by Bruno Renié

Other Decks in Technology

Transcript

  1. Working with ops & support staff Large infrastructure, lots of

    moving parts whoami: lead dev @ exoscale
  2. People need to know what's going on, anytime Not everyone

    is a developer SSH, grep and tail not acceptable
  3. A common way to log things import logging logger =

    logging.getLogger(__name__) logger.info("user {} logged in".format(user.email))
  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"}
  5. Marketing: "Who signed up today?" Finance: "How much income in

    the past week?" Support: "What did this user do in the past 24 hours?"
  6. <identifier> <value> <timestamp> db1.load.midterm 4.6 1399842778 Measure at regular intervals,

    send using the carbon line protocol echo " … " | nc host port
  7. In Python pystatsd django-statsd-mozilla from stastd import StastClient statsd =

    StatsClient() @statsd.timer("something") def expensive_computation(): # …
  8. Graphing Graphite: rendering API (json / PNG / etc) Countless

    dashboard apps Grafana Graph-explorer etc
  9. What about alerts? Riemann: metrics hub/proxy App server overloaded, full

    disk, etc Analyzes metrics computes aggregates notifies
  10. Resources Events Metrics structlog.org rsyslog logstash elasticsearch kibana carbon /

    whisper graphite-api grafana collectd statsd riemann.io bernhard