Skip to main content

Chaos Toolkit extension for Reliably

Version Python versions License Build

Chaos Toolkit extension for Reliably.

Install

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

$ pip install chaostoolkit-reliably

Authentication

To use this package, you must create have registered with Reliably services.

Then you need to set some environment variables as secrets.

  • RELIABLY_TOKEN: the token to authenticate against Reliably's API
  • RELIABLY_HOST:: the hostname to connect to, default to app.reliably.com
{
    "secrets": {
        "reliably": {
            "token": {
                "type": "env",
                "key": "RELIABLY_TOKEN"
            },
            "host": {
                "type": "env",
                "key": "RELIABLY_HOST",
                "default": "app.reliably.com"
            }
        }
    }
}

Usage

As Steady Steate Hypothesis or Method

This extensions offers a variety of probes and tolerances ready to be used in your steady-state blocks.

For instance:

{
  "version": "1.0.0",
  "title": "SLO error-count-3h / Error budget 10%",
  "description": "Monitor the health of our demo service from our users perspective and ensure they have a high-quality experience",
  "runtime": {
    "hypothesis": {
      "strategy": "after-method-only"
    }
  },
  "steady-state-hypothesis": {
    "title": "Compute SLO and validate its Error Budget with our target",
    "probes": [
      {
        "type": "probe",
        "name": "get-slo",
        "tolerance": {
          "type": "probe",
          "name": "there-should-be-error-budget-left",
          "provider": {
            "type": "python",
            "module": "chaosreliably.activities.slo.tolerances",
            "func": "has_error_budget_left",
            "arguments": {
              "name": "cloudrun-service-availability"
            }
          }
        },
        "provider": {
          "type": "python",
          "module": "chaosreliably.activities.slo.probes",
          "func": "compute_slo",
          "arguments": {
            "slo": {
              "apiVersion": "sre.google.com/v2",
              "kind": "ServiceLevelObjective",
              "metadata": {
                "name": "cloudrun-service-availability",
                "labels": {
                  "service_name": "cloudrun",
                  "feature_name": "service",
                  "slo_name": "availability"
                }
              },
              "spec": {
                "description": "Availability of Cloud Run service",
                "backend": "cloud_monitoring_mql",
                "method": "good_bad_ratio",
                "exporters": [

                ],
                "service_level_indicator": {
                  "filter_good": "fetch cloud_run_revision | metric 'run.googleapis.com/request_count' | filter resource.project_id == '${CLOUDRUN_PROJECT_ID}' | filter resource.service_name == '${CLOUDRUN_SERVICE_NAME}' | filter metric.response_code_class == '2xx'",
                  "filter_valid": "fetch cloud_run_revision | metric 'run.googleapis.com/request_count' | filter resource.project_id == '${CLOUDRUN_PROJECT_ID}' | filter resource.service_name == '${CLOUDRUN_SERVICE_NAME}'"
                },
                "goal": 0.9
              }
            },
            "config": {
              "backends": {
                "cloud_monitoring_mql": {
                  "project_id": "${STACKDRIVER_HOST_PROJECT_ID}"
                }
              },
              "error_budget_policies": {
                "default": {
                  "steps": [
                    {
                      "name": "3 hours",
                      "burn_rate_threshold": 9,
                      "alert": false,
                      "window": 10800,
                      "message_alert": "Page the SRE team to defend the SLO",
                      "message_ok": "Last 3 hours on track"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    ]
  },
  "method": [
    {
      "name": "inject-traffic-into-endpoint",
      "type": "action",
      "background": true,
      "provider": {
        "func": "inject_gradual_traffic_into_endpoint",
        "type": "python",
        "module": "chaosreliably.activities.load.actions",
        "arguments": {
          "endpoint": "${ENDPOINT}",
          "step_duration": 30,
          "test_duration": 300,
          "step_additional_vu": 3,
          "vu_per_second_rate": 1,
          "results_json_filepath": "./load-test-results.json"
        }
      }
    }
  ]
}

This above example will get the last 5 Objective Results for our Must be good SLO and determine if they were all okay or whether we've spent our error budget they are allowed.

As controls

You can use controls provided by chaostoolkit-reliably to track your experiments within Reliably. The block is inserted automatically by Reliably when you import the experiment into Reliably.

Contribute

From a code perspective, if you wish to contribute, you will need to run a Python 3.6+ environment. Please, fork this project, write unit tests to cover the proposed changes, implement the changes, ensure they meet the formatting standards set out by black, ruff, isort, and mypy, add an entry into CHANGELOG.md, and then raise a PR to the repository for review

Please refer to the formatting section for more information on the formatting standards.

The Chaos Toolkit projects require all contributors must sign a Developer Certificate of Origin on each commit they would like to merge into the master branch of the repository. Please, make sure you can abide by the rules of the DCO before submitting a PR.

Develop

If you wish to develop on this project, make sure to install the development dependencies. First you will need to install globally pdm and create a virtual environment:

$ pdm create venv
$ pdm use
$ $(pdm venv activate)

Then install the dependencies:

$ pdm sync -d

Test

To run the tests for the project execute the following:

$ pdm run test

Formatting and Linting

We use a combination of black, [ruff][flake8], isort, mypy and [bandit][] to both lint and format this repositories code.

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

$ pmd 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. It will also provide you with any errors mypy picks up.

Metadata

Release files for chaostoolkit-reliably 0.84.0

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-reliably 0.84.0
File Size Uploaded
chaostoolkit_reliably-0.84.0.tar.gz 42.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chaostoolkit-reliably 0.84.0
File Interpreter ABI Platform
chaostoolkit_reliably-0.84.0-py3-none-any.whl Python 3 none any Details

Total release size: 95.4 kB

Release files / chaostoolkit_reliably-0.84.0.tar.gz

Download URL chaostoolkit_reliably-0.84.0.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2db443805c527cc1cbd9ad014dbde5e895008292d007bac332e61c4c4e919bc3
BLAKE2b-256 checksum
How to use checksums
91cf1db45b18e92501661c957018403fb581153f0f34d714a43fa59a527ef01b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release files / chaostoolkit_reliably-0.84.0-py3-none-any.whl

Download URL chaostoolkit_reliably-0.84.0-py3-none-any.whl
Size 52.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb016d03d2a781092a331582a6584ff083e9102d8e13f2afb52db9a3b3cfc2d7
BLAKE2b-256 checksum
How to use checksums
73380f3b67e2cb478e78236f08550a52ad926711cd0225df03d3edada52d67fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.84.0 This release

2 release files

0.82.0

2 release files

0.81.0

2 release files

0.80.3

2 release files

0.80.2

2 release files

0.80.1

2 release files

0.79.0

2 release files

0.78.0

2 release files

0.77.0

2 release files

0.76.0

2 release files

0.75.0

2 release files

0.74.0

2 release files

0.73.0

2 release files

0.72.1

2 release files

0.67.0

2 release files

0.66.0

2 release files

0.65.3

2 release files

0.65.2

2 release files

0.65.1

2 release files

0.65.0

2 release files

0.64.0

2 release files

0.63.3

2 release files

0.63.2

2 release files

0.63.1

2 release files

0.63.0

2 release files

0.62.1

2 release files

0.62.0

2 release files

0.58.1

2 release files

0.58.0

2 release files

0.54.2

2 release files

0.53.0

2 release files

0.51.0

2 release files

0.48.0

2 release files

0.47.0

2 release files

0.46.0

2 release files

0.45.1

2 release files

0.45.0

2 release files

0.36.0

2 release files

0.35.0

2 release files

0.34.3

2 release files

0.34.2

2 release files

0.34.1

2 release files

0.34.0

2 release files

0.33.0

2 release files

0.32.0

2 release files

0.31.0

2 release files

0.30.3

2 release files

0.30.2

2 release files

0.30.1

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.18.7

2 release files

0.18.6

2 release files

0.18.5

2 release files

0.18.4

2 release files

0.18.3

2 release files

0.18.2

2 release files

0.18.1

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.13.0

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

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