Skip to main content

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.

View the documentation here.

View the package on PyPI here.

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


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.0a2.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

domprob-0.1.0a2-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file domprob-0.1.0a2.tar.gz.

File metadata

  • Download URL: domprob-0.1.0a2.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for domprob-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 b59293911f2450c5bfaf52e9e429fb372623f4d154826ab2872d12c9c88bd5aa
MD5 5eae0853d50fa7a9e0541c5782876a5d
BLAKE2b-256 902ec93970f5f39ff5913ffa5125df7c59f83ce6f27bc650726ae91ecf5d48f3

See more details on using hashes here.

File details

Details for the file domprob-0.1.0a2-py3-none-any.whl.

File metadata

  • Download URL: domprob-0.1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 32.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for domprob-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 588c1d4c2384d7a34d0793b8a81a1c0756d33303ab291e37aceb3dd7e0f14a88
MD5 abe36a6a6dbe78b0c21818d233f58ea6
BLAKE2b-256 1021524ad1b2890a0f76b1361627578f7671c0b95ea614a777e7a8e2d82faa50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page