Skip to main content
https://img.shields.io/pypi/v/talisker.svg https://img.shields.io/travis/canonical-ols/talisker.svg Documentation Status

Talisker is a runtime for your wsgi app that aims to provide a common platform for your python services.

tl;dr

Simply run your wsgi app with talisker as if it was gunicorn.:

talisker app:wsgi -c config.py ...

Talisker will wrap your app in a some simple WSGI middleware, and configure logging to output structured logging like so:

logger = logging.getLogger('app')
logger.info('something happened', extra={'context': 'I haz it'})

will output:

2016-01-13 10:24:07.357Z INFO app "something happened" svc.context="I haz it" request_id=...

It also exposes some status endpoints you can use, go to the /_status/ url on your app to see them.

This all works out of the box by using the talisker runner instead of gunicorn’s, and there are many more features you can use too.

Elevator Pitch

Talisker is based on a number of standard python tools:

  • stdlib logging for logs

  • gunicorn for a wsgi runner

  • requests for http requests

  • statsd for metrics (and optionally, prometheus_client)

  • sentry for errors

  • werkzeug for thread locals and wsgi utilities

It also supports additionaly optional tools:

  • celery for async tasks

  • prometheus as an alternate metrics tool

It’s main job is to integrate and configure all the above in a single tool, for use in both dev and production, which provides a standard set of features out of the box:

  • drop-in replacement for gunicorn as a wsgi runner

  • standardised structured logging on top of python stdlib logging

  • request id tracing

  • standard set of status endpoints for your app

  • easier configuration via env vars

  • metrics for everything

  • deep sentry integration (WIP)

All the above are available by just using the talisker entry point script, rather than gunicorn.

In addition, with a small amount of effort, your app can benefit from additional features:

  • add structured logging tags to your application logs

  • simple deeper nagios checks - just implement a /_status/check url in your app

  • per-thread requests connection pool management

Additionally, talisker provides additional tools for integrating with your infrastructure:

  • grok filters for log parsing

  • rsyslog templates and config for log shipping (TODO)

Talisker is opinionated, and derived directly from the authors’ needs and as such not currently very configurable. However, PR’s are very welcome!

For more information, see The Documentation, which should be found at:

https://talisker.readthedocs.io

Release files for talisker-fork 0.10.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for talisker-fork 0.10.1
File Size Uploaded
talisker-fork-0.10.1.tar.gz 24.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for talisker-fork 0.10.1
File Interpreter ABI Platform
talisker_fork-0.10.1-py3-none-any.whl Python 3 none any Details

Total release size: 63.5 kB

Release files / talisker-fork-0.10.1.tar.gz

Download URL talisker-fork-0.10.1.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
82eec8a6d4359de48f25e8b7a6ed3f6def87ce7567f2cfd85f1f33cd645063b8
BLAKE2b-256 checksum
How to use checksums
f177e3a392d48fc62610539485755423a9cc1f8e554badb70fd2b4e612f699d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / talisker_fork-0.10.1-py3-none-any.whl

Download URL talisker_fork-0.10.1-py3-none-any.whl
Size 39.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f9cabeba1c721c014d30a294121264cb51eaddd0d885701ec37e122a231102c
BLAKE2b-256 checksum
How to use checksums
6d6c7af82ad3fbe922f8bc5e8a3d908d09ec3cd82f44d4a5b7d6a08999d4442a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.10.1 This release

2 release files

0.10.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page