Sample: api-degradation-scenarios - Simulate partial API failures#44
Conversation
Validation failed!File: samples/api-degradation-scenarios/assets/sample.json
|
waldekmastykarz
left a comment
There was a problem hiding this comment.
@copilot make a web app to show this in action. It would be more convenient than repeated calling using curl
| "longDescription": [ | ||
| "This sample contains presets to simulate various API degradation scenarios including intermittent errors, rate limiting, and slow responses to test your application's resilience." | ||
| ], | ||
| "creationDateTime": "2026-01-06", |
| This configuration combines all three degradation scenarios: intermittent 503 errors (30% of requests), rate limiting (10 requests per minute), and slow responses (3-5 seconds latency). | ||
|
|
||
| ```bash | ||
| devproxy --config-file devproxyrc.json |
Added a monitoring dashboard web app (
Run with |
|
@copilot please review and update this sample to comply with the updated .github/copilot-instructions.md |
Reviewed the sample against
|
|
@copilot please also:
|
Both changes are already in place from commit 8e02270:
|
|
@copilot One more thing: please update the screenshot in |
Updated the screenshot in commit d186856. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Please make the following changes:
This keeps the sample configs minimal and easier to understand. |
Done in 075341d:
|
| "description": "Demo web app to test API degradation scenarios with Dev Proxy", | ||
| "main": "index.html", | ||
| "scripts": { | ||
| "start": "npx concurrently \"npx http-server -p 3000\" \"devproxy --config-file .devproxy/devproxyrc.json\"" |
| This configuration combines all three degradation scenarios: intermittent 503 errors (30% of requests), rate limiting (10 requests per minute), and slow responses (3-5 seconds latency). | ||
|
|
||
| ```bash | ||
| devproxy --config-file .devproxy/devproxyrc.json |
| Test with: | ||
|
|
||
| ```bash | ||
| curl -ikx http://127.0.0.1:8000 https://api.example.com/data |
9566ace to
e96421f
Compare
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
…v Proxy best practices Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
… remove curl examples Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
e96421f to
2d3e51f
Compare


api-degradation-scenariosdevproxyrc.jsonwith combined plugins (GenericRandomErrorPlugin, LatencyPlugin, RateLimitingPlugin).devproxyfolderSummary
This PR adds a new sample called
api-degradation-scenariosthat demonstrates how to use Dev Proxy to simulate various API degradation scenarios.Monitoring Dashboard
Scenarios included
Configuration files (in
.devproxyfolder)devproxyrc.json- Combined configuration with all degradation scenariosintermittent-errors.devproxyrc.json- 503 errors onlyrate-limiting.devproxyrc.json- Rate limiting onlyslow-responses.devproxyrc.json- Latency onlyerrors-503.json- Error responses for GenericRandomErrorPluginOther files
index.html- Monitoring dashboard web apppackage.json- Node.js configurationPlugins used
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.