teluzia.Cloud Engineer · Day 159
CHAPTER 23 · FLAGSHIP CAPSTONE

Observability, security and failure testing

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Observability acceptance is today's starting point. Inject a synthetic 500 and check that error ratio rises, the request ID appears in logs and the relevant alert fires. If metrics stay healthy, inspect instrumented paths rather than claiming the app is monitored. You will connect this with security acceptance and failure testing. The lesson's artifact brings these decisions together: Create a capstone acceptance matrix with telemetry, security and a bad-health-path tabletop test; record observed versus expected detection and recovery.

Think of it this way

Acceptance testing is an inspection with three lenses: useful instruments, controlled access and a demonstrated recovery from one bounded fault.

TOPIC 01 / 03Step by step

Observability acceptance

Define a request-success signal, latency view and structured error logs. Test whether telemetry answers a question about users; colorful panels without useful queries do not establish observability. Inject a synthetic 500 and check that error ratio rises, the request ID appears in logs and the relevant alert fires. If metrics stay healthy, inspect instrumented paths rather than claiming the app is monitored.

WORKED EXAMPLE
Inject a synthetic 500 and check that error ratio rises, the request ID appears in logs and the relevant alert fires. If metrics stay healthy, inspect instrumented paths rather than claiming the app is monitored.

An acceptance signal tests a stated requirement; instrumentation records application behavior; observability supports answering an operational question. Imagine the health endpoint passes while task creation fails because storage permissions are missing. Request success and structured failure logs must cover the business path, not just the process-health path. Create a synthetic successful operation and a controlled failed operation, then verify metric, log and alert behavior for each. Tag the environment and release so evidence is attributable to the tested version. More telemetry adds cost and data exposure; collecting a few meaningful fields can be better than verbose unstructured payloads. Use the acceptance matrix to connect infrastructure, application and monitoring, and mark a missing signal as an unfinished integration rather than presenting an attractive dashboard as sufficient evidence.

Why this matters

If metrics stay healthy, inspect instrumented paths rather than claiming the app is monitored.

A common trap

A colorful dashboard proves users are receiving successful responses.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

Observability acceptance

Define a request-success signal, latency view and structured error logs. Test whether telemetry answers a question about users; colorful panels without useful queries do not establish observability. Inject a synthetic 500 and check that error ratio rises, the request ID appears in logs and the relevant alert fires. If metrics stay healthy, inspect instrumented paths rather than claiming the app is monitored.

WORKED EXAMPLE
Inject a synthetic 500 and check that error ratio rises, the request ID appears in logs and the relevant alert fires. If metrics stay healthy, inspect instrumented paths rather than claiming the app is monitored.

An acceptance signal tests a stated requirement; instrumentation records application behavior; observability supports answering an operational question. Imagine the health endpoint passes while task creation fails because storage permissions are missing. Request success and structured failure logs must cover the business path, not just the process-health path. Create a synthetic successful operation and a controlled failed operation, then verify metric, log and alert behavior for each. Tag the environment and release so evidence is attributable to the tested version. More telemetry adds cost and data exposure; collecting a few meaningful fields can be better than verbose unstructured payloads. Use the acceptance matrix to connect infrastructure, application and monitoring, and mark a missing signal as an unfinished integration rather than presenting an attractive dashboard as sufficient evidence.

Why this matters

If metrics stay healthy, inspect instrumented paths rather than claiming the app is monitored.

A common trap

A colorful dashboard proves users are receiving successful responses.

Security acceptance

Review public exposure, role permissions, image findings and secret handling. Record accepted risks with owners; a clean scanner report does not prove the whole architecture secure. The app role writes one data resource; the pipeline deploys only the capstone service. Compare permissions with these needs and verify that example screenshots contain no token or connection string.

WORKED EXAMPLE
The app role writes one data resource; the pipeline deploys only the capstone service. Compare permissions with these needs and verify that example screenshots contain no token or connection string.

A trust boundary identifies where authorization is required; least privilege limits allowed actions; a residual risk remains after controls are applied. Imagine CI and the app share an administrator role because it was convenient during setup. Separate their needs, then test app data access and deployment actions independently using narrowly scoped identities. Inspect network exposure, scanner findings and secret handling as complementary checks, not interchangeable proof. A configuration that meets the lab's requirements can still have limitations such as no advanced abuse controls; document them honestly. Restriction can uncover hidden dependency assumptions and require further integration work. Verify allowed and denied cases with synthetic input, preserve sanitized findings and ensure the demo never turns a secret-bearing error response into public portfolio evidence.

Why this matters

Compare permissions with these needs and verify that example screenshots contain no token or connection string.

A common trap

A scanner with no findings proves all security boundaries are correct.

Failure testing

Inject a reversible fault into an isolated copy, such as an invalid health path. State stop conditions and expected detection; confirm restored requests and stable signals after repair. Change the health path only in a sandbox copy. Expect readiness loss, observe detection, restore the path and confirm both readiness and representative user requests remain stable.

WORKED EXAMPLE
Change the health path only in a sandbox copy. Expect readiness loss, observe detection, restore the path and confirm both readiness and representative user requests remain stable.

A test hypothesis predicts detection and recovery; an abort condition stops unsafe behavior; recovery criteria verify the original contract. Imagine a sandbox rollout points at a nonexistent health endpoint. Predict target unhealthiness and routing behavior before applying the isolated fault, and check that the intended monitoring detects it. Restore the correct path using the documented rollback and verify task operations as well as health. Confirm queued or partially processed work remains correct if the test touched the business path. More realistic injection strengthens evidence but increases blast radius and cleanup demands. A tabletop may be the right first step for a beginner. Keep the fault, expected signals, actual signals and correction tied to the same acceptance requirement so the exercise tests integration rather than merely creating an error.

Why this matters

Expect readiness loss, observe detection, restore the path and confirm both readiness and representative user requests remain stable.

A common trap

A failure experiment needs no isolation or recovery verification.

KEEP THESE WITH YOU

Today’s takeaways

Observability acceptance: Define a request-success signal, latency view and structured error logs.

Security acceptance: Review public exposure, role permissions, image findings and secret handling.

Failure testing: Inject a reversible fault into an isolated copy, such as an invalid health path.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed