Python Monitoring Quick Start Guide

Getting started with Instrumental and Python

Here's how to get up and running with Python application monitoring and Instrumental. Like all our agents, the Python agent is designed to prevent exceptions from impacting your application. It's also completely non-blocking.


Add the agent to your project:

pip install --upgrade instrumental_agent

Require the agent and configure it with your project token:

from instrumental_agent import Agent
i = Agent("PROJECT_TOKEN", enabled=True)

Sending Metrics

Increments are simple counters. learn more

i.increment('', 1)

Gauges represent a value at a point in time. learn more

i.gauge('', 234)

The time method measures a function call time.

i.time('', lambda: Post.find(1))

Sending Notices

Notices are project specific events.

i.notice('Deployed revision 038ade4 to production')
i.notice('event with a duration', time.time(), timedelta(minutes=20))

More Python + Instrumental

Complete Python Agent Docs

Everything to know about the Instrumental Python agent!

go to docs

Where to Start Monitoring

Not sure what to measure? This guide will help you decide where to start!

read the guide

Using StatsD or statsite? We’ve got you covered with our StatsD backend and statsite sink

Questions? We can help!