Chaos Toolkit extension for DataDog
Project description
Chaos Toolkit Extension For Datadog
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 keyDD_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.
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
Built Distribution
File details
Details for the file chaostoolkit_datadog-0.3.1.tar.gz
.
File metadata
- Download URL: chaostoolkit_datadog-0.3.1.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eac8aef5b46948bb7a0fccb1e212202f20ef6659a8e03720a1075a2d482d225a |
|
MD5 | aa7cfa20573e86ea36e406b58725c6d0 |
|
BLAKE2b-256 | 73932a7f8b45bf0a26191899e32c3c5a212558683c4e515e664f7b7c7fb05854 |
File details
Details for the file chaostoolkit_datadog-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: chaostoolkit_datadog-0.3.1-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 614f8a45f88d30f5960a2627dbc9d7345a656949bf7e9081f102c8b8fb01118f |
|
MD5 | e346dcd34ec221144c2e7b1ada680f15 |
|
BLAKE2b-256 | 0729953d80b894b28d4daa4f8e70bb61f8f5f69f9f48a1ad3642c25d8a181235 |