{"version":"2.1.282","anchor":"spend-limit-proxy-load-test-mode-and-failure-callbacks","canonical_anchor":"spend-limit-proxy-load-test-mode-and-failure-callbacks","heading":"Spend-limit proxy can run load tests without counting spend","tier":"notice","area":"Self-Hosted Gateway","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.282\/e\/spend-limit-proxy-load-test-mode-and-failure-callbacks","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.282","markdown":"### Spend-limit proxy can run load tests without counting spend\n\nThe spend-limit layer records zero cost in load-test mode and now reports failed spend checks and failed spend writes\n\n**Unclear.** Which product ships this spend-limit proxy is not identified.\n\n**What**\n\nThe spend-limit layer used by an administrator-run gateway has changed in two ways:\n\n- Load-test mode: when `load_test_mode.enabled` is set, traffic is recorded as costing nothing, and blocked-spend records are marked as load tests.\n\n- Failure reporting: a callback now fires when the pre-request spend check fails and when recording spend fails, labelled \"check\" and \"write\" respectively.\n\nPreviously there was no load-test handling and no failure callback.\n\n**Why**\n\nAdministrators can put load on the gateway to test it without that traffic counting against real spend limits, and spend-check failures such as timeouts become visible.\n\n- Area: Self-Hosted Gateway\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5"}