Skip to main content

Chaos Toolkit Extension For Datadog

Version License

Build Python versions

This project contains Chaos Toolkit activities and tolerances to work with DataDog.

Install

This package requires Python 3.8+

To be used from your experiment, this package must be installed in the Python environment where chaostoolkit already lives.

$ pip install chaostoolkit-datadog

Usage

A typical experiment using this extension would look like this:

{
    "version": "1.0.0",
    "title": "Run a, experiment using a DataDog SLO to verify our system",
    "description": "n/a",
    "configuration": {
        "datadog_host": "https://datadoghq.eu"
    },
    "steady-state-hypothesis": {
        "title": "n/a",
        "probes": [
            {
                "type": "probe",
                "name": "read-slo",
                "tolerance": {
                    "type": "probe",
                    "name": "check-slo",
                    "provider": {
                        "type": "python",
                        "module": "chaosdatadog.slo.tolerances",
                        "func": "slo_must_be_met",
                        "arguments": {
                            "threshold": "7d"
                        }
                    }
                },
                "provider": {
                    "type": "python",
                    "module": "chaosdatadog.slo.probes",
                    "func": "get_slo",
                    "arguments": {
                        "slo_id": "..."
                    }
                }
            }
        ]
    },
    "method": []
}

That's it!

Please explore the code to see existing probes and actions.

Configuration

In the configuration block you may want to specify the DataDog host you are targetting:

    "configuration": {
        "datadog_host": "https://datadoghq.eu"
    },

The authentication can be set using the typical DataDog environment variables, notably:

  • DD_API_KEY: the API key
  • DD_APP_KEY: the application key

Test

To run the tests for the project execute the following:

$ pdm run test

Formatting and Linting

We use ruff to both lint and format this repositories code.

Before raising a Pull Request, we recommend you run formatting against your code with:

$ pdm run format

This will automatically format any code that doesn't adhere to the formatting standards.

As some things are not picked up by the formatting, we also recommend you run:

$ pdm run lint

To ensure that any unused import statements/strings that are too long, etc. are also picked up.

Contribute

If you wish to contribute more functions to this package, you are more than welcome to do so. Please, fork this project, make your changes following the usual PEP 8 code style, sprinkling with tests and submit a PR for review.

Metadata

Release files for chaostoolkit-datadog 0.3.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 chaostoolkit-datadog 0.3.1
File Size Uploaded
chaostoolkit_datadog-0.3.1.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chaostoolkit-datadog 0.3.1
File Interpreter ABI Platform
chaostoolkit_datadog-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.1 kB

Release files / chaostoolkit_datadog-0.3.1.tar.gz

Download URL chaostoolkit_datadog-0.3.1.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eac8aef5b46948bb7a0fccb1e212202f20ef6659a8e03720a1075a2d482d225a
BLAKE2b-256 checksum
How to use checksums
73932a7f8b45bf0a26191899e32c3c5a212558683c4e515e664f7b7c7fb05854
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / chaostoolkit_datadog-0.3.1-py3-none-any.whl

Download URL chaostoolkit_datadog-0.3.1-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
614f8a45f88d30f5960a2627dbc9d7345a656949bf7e9081f102c8b8fb01118f
BLAKE2b-256 checksum
How to use checksums
0729953d80b894b28d4daa4f8e70bb61f8f5f69f9f48a1ad3642c25d8a181235
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

1 release file

0.2.0

2 release files

0.1.1

2 release files

0.1.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