Python package to implement observability domain probes
Project description
domprob 🛰️
Inspired by this blog post, domprob is designed to be a Python package to implement observability domain probes.
Overview
Keep your business logic tidy and abstract the observability code away.
Turn this:
class Order:
def checkout(self):
self.logger.log(f"Attempting to checkout order {self.order}")
try:
self.checkout_service.checkout_order(self.order)
except CheckoutError as e:
self.logger.error(f"Checkout for order {self.order} failed: {e}")
self.metrics.increment('checkout-failed', ('failed_orders': 1))
return
self.logger.log(f"Order checkout completed successfully")
self.metrics.increment('checkout-successful', ('successful_orders': 1))
Into ✨this✨:
class Order:
def checkout(self):
self.probe.announce(AttemptingCheckoutObservation())
try:
self.checkout_service.checkout_order(self.order)
except CheckoutError as e:
self.probe.announce(CheckoutFailedObservation())
return
self.probe.announce(CheckoutSuccessfulObservation())
Installation
Install using uv:
uv add domprob
Using pip:
pip install domprob
Using poetry:
poetry add domprob
Usage
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
domprob-0.1.0a3.tar.gz
(27.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
domprob-0.1.0a3-py3-none-any.whl
(33.8 kB
view details)
File details
Details for the file domprob-0.1.0a3.tar.gz.
File metadata
- Download URL: domprob-0.1.0a3.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebf33d995ad37e4cba9d81e2fe8bdfe48004b5467ac041f9d797fae8a51ad843
|
|
| MD5 |
1e3be02f95c19cc35036fd8a8d1b262a
|
|
| BLAKE2b-256 |
615334d6ad2e3528eb5c684ed551cb5486d1ad54389209f72891aed2c8e1c6bd
|
File details
Details for the file domprob-0.1.0a3-py3-none-any.whl.
File metadata
- Download URL: domprob-0.1.0a3-py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f96fe555bc95b03288e36111b9bc4206a769e497327881d86912a642cded4935
|
|
| MD5 |
6efe230d1921373a4351babd8e39e192
|
|
| BLAKE2b-256 |
567d6802793d3f21cd9a6981e2133c403e7ccde5d0e1925f4e378998d7c82882
|