Skip to content

Add continuous SLI demo and streamline onboarding - #80

Merged
xavierjohn merged 8 commits into
mainfrom
demo/continuous-sli-showcase
Oct 16, 2026
Merged

xavierjohn merged 8 commits into
mainfrom
demo/continuous-sli-showcase

Conversation

@xavierjohn

@xavierjohn xavierjohn commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add a one-command, always-on Project Tracker demo with the API, continuous traffic, recurring incidents, Collector, Prometheus, and Grafana.
  • Show per-project availability and exact within-250-ms latency compliance, with healthy background traffic and meaningful no-data behavior.
  • Use the library's Unknown sentinel for rejected project IDs, so unknown-customer diagnostics reach the dashboard without exposing arbitrary rejected values as metric dimensions. Document how to exercise the panel and why it is normally quiet.
  • Keep continuous traffic running through transient request failures and timeouts. Log only the first failure of each kind per phase while counting every failure in phase summaries. Rotate all five containers' JSON logs at 10 MB with three retained files.
  • Set explicit local Prometheus retention to 24 hours or 256 MB, with documented head/WAL and compaction caveats. Keep the observability services restarting with the continuous demo and document how to stop them.
  • Make finite runs stop sending promptly on failure, cancel/drain outstanding work, and give requested shutdown precedence. Report unexpected and secondary cleanup failures without masking the initiating exception or producing an unhandled stack trace. Suppress the first stop signal before invoking cancellation callbacks, report callback failures, and allow another Ctrl+C or supported SIGTERM to terminate even if draining is stuck.
  • Cap traffic at 32 in-flight requests, retire completed tasks, and skip missed send slots instead of creating catch-up bursts. Reuse the pacing deadline instead of creating a linked cancellation source and timer on every wait. Require digit-only, invariant CLI values within 1-1000 requests/second and 1-3600 seconds/phase, with friendly argument errors. Do not add retries or circuit-breaking policies that alter the intended incident traffic.
  • Start traffic only after the API's HTTP healthcheck succeeds. Replace host-address autodiscovery with explicit --health-check <URL>; incorrect probe arguments return usage rather than starting another server. Share ${SLI_DEMO_PORT:-8080} across API binding, published-port target, probe, and traffic URL. Probe every five seconds during startup and every 30 seconds afterward using the existing .NET runtime.
  • Cache restores separately and isolate each Docker image's project-graph inputs. Exclude worktrees, workflows, and unrelated documentation from the build context while retaining the two required package guides.
  • Define sync modes in one status/delay/error table. Cover actual delay palettes, response contracts, both sides of the configured 250-ms threshold, bounded diagnostics, failure precedence, and race-free asynchronous scheduling with focused regressions. Avoid fragile assumptions that CI HTTP requests must finish below 250 ms.
  • Align package repository links and the SBOM namespace, and remove redundant dependencies/version pins without changing resolved logging dependencies. Explain the test-only TimeProvider package's independent release cadence rather than trying to align it to an unpublished runtime-servicing version.
  • Refresh the landing page with a checked-in dashboard screenshot and complete onboarding. Review and align all 10 product documents, including API references and the metric-contract design record.
  • Retain focused Console, Minimal API, and API-versioned MVC examples with stable project dimensions; remove redundant weather/greeting demos, old Aspire launchers, and obsolete screenshots. Preserve custom-meter ownership guidance in the Console example.

Run the demo

From the repository root, with Docker Engine 25 or newer running Linux containers and Compose v2.20.2 or newer:

docker compose -f .\sample\Observability\Grafana\docker-compose.yml --profile demo up --build -d

Open the SLI dashboard and compare project-red with the healthy projects as incidents repeat.

The library's public APIs, metric names, tags, and millisecond units are unchanged. This is a loopback-only learning environment, not a production deployment.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Test Results

467 tests  +122   465 ✅ +122   33s ⏱️ +13s
  6 suites +  3     2 💤 ±  0 
  6 files   +  3     0 ❌ ±  0 

Results for commit 3fd160f. ± Comparison against base commit e6ba362.

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.79775% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.71%. Comparing base (e6ba362) to head (3fd160f).

Files with missing lines Patch % Lines
sample/GenerateSli/Program.cs 83.75% 34 Missing and 5 partials ⚠️
sample/SliProductionDemo/Program.cs 85.71% 2 Missing and 2 partials ⚠️
sample/MinApi/Program.cs 92.30% 1 Missing and 1 partial ⚠️
...liProductionDemo/Controllers/ProjectsController.cs 96.87% 0 Missing and 1 partial ⚠️
.../WebApiVersioned/Controllers/ProjectsController.cs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #80      +/-   ##
==========================================
- Coverage   95.66%   92.71%   -2.96%     
==========================================
  Files          26       33       +7     
  Lines         600     1002     +402     
  Branches       90      173      +83     
==========================================
+ Hits          574      929     +355     
- Misses         13       50      +37     
- Partials       13       23      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

xavierjohn and others added 7 commits October 16, 2026 10:09
Fail finite runs promptly, preserve cancellation during draining, and bound in-flight work without catch-up bursts. Gate Compose traffic on HTTP readiness and isolate Docker cache inputs. Strengthen sample regressions and align documentation, repository metadata, and redundant dependency pins.
Summarize repeated transport failures per phase and rotate container logs without adding resilience dependencies. Preserve initiating failures through cancellation and draining, and report unexpected CLI failures cleanly. Derive readiness from HTTP configuration, reduce steady probe frequency, consolidate sync modes, trim build context, and strengthen deterministic scenario coverage.
Advance the fake clock from synchronous send overhead when checking per-phase diagnostic suppression. Assert exactly fifty counted failures rather than depending on a busy virtual-time driver outrunning coverage-instrumented continuations.
Recognize health-check mode alongside host arguments and honor Kestrel endpoint precedence. Preserve explicit malformed-binding diagnostics and allow another stop signal to terminate a stalled graceful shutdown. Set local Prometheus retention and explain the independent test-only TimeProvider release cadence without changing dependency versions.
RunConsoleAsync now returns success for a completed run and surfaces real
faults even when cancellation was also requested, instead of masking both as
"Scenario stopped." Centralize the readiness timeout, and correct the README
troubleshooting text for an API that stays unhealthy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@xavierjohn
xavierjohn merged commit b02b997 into main Oct 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants