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)
Increments are simple counters. learn more
Gauges represent a value at a point in time. learn more
The time method measures a function call time.
i.time('app.query_time.post.find', lambda: Post.find(1))
Notices are project specific events.
i.notice('Deployed revision 038ade4 to production') i.notice('event with a duration', time.time(), timedelta(minutes=20))