Troubleshooting
Troubleshoot service observability — Sustainable Catalyst Platform Core
Service observability failures can obscure operational problems when telemetry is incomplete, request identifiers are inconsistent, or monitoring results are misinterpreted. This guide covers diagnosing those failures, verifying service-level measurements, and recovering without exposing sensitive research records or compromising operational evidence.
Application: Sustainable Catalyst Platform Core
Component: Observability & Production Operations
Documentation status: Source-reviewed troubleshooting procedure; deployed verification pending
Source baseline: 59b8444365525a58fd4f6a7e29a20d712769e1a2
Estimated reading time: 17–20 minutes
Audience: Platform operators, integration engineers, service owners, technical reviewers
Service observability fails when an incident cannot be reconstructed reliably from safe diagnostic evidence. A healthy-looking dashboard, a missing metric, or a request ID in one log is not enough: operators need to identify the actual request, distinguish Core failures from downstream failures, reproduce the relevant metrics, and demonstrate that their diagnostic records contain no credentials or private research content.
1. Goal — make failures attributable without exposing research data
Resolve missing or misleading request metrics, broken correlation IDs, inconsistent SLO evaluations, stale operational status, and gateway failures while preserving the last accepted application state. The primary acceptance criterion is: a specific failing request can be traced across authorized service boundaries using nonsecret identifiers, and no research record or credential is disclosed in telemetry or public status.
Troubleshooting does not authorize new data collection. Obtain incident ownership and evidence-handling approval before querying operator logs, changing retention, or exporting monitoring data.
2. Requirements — verify access, release and observation scope
- Use an explicitly authorized staging environment for synthetic requests and fault injection. Production investigation should be read-only unless separate change approval exists.
- Record the deployed image digest, environment, Core release and commit; match them to the reviewed source baseline before treating route behavior as confirmed.
- Capture a bounded observation window in UTC, requested service, expected request count, sampled request count, status distribution, and nonsecret request IDs.
- Use service-owned read credentials or a scoped public
data:readcredential as applicable. Never paste a token into incident notes, a URL, screenshots, or shell transcript. - Preserve a sanitized evidence packet with the incident ID, query window, filtering rules, observed error, result, and reviewer. Do not publish internal deployment metadata.
Check actual deployed authorization; repository defaults and visible UI controls are not permission proofs.
3. Separate symptom, impact and root cause
| Symptom | Likely class | First nonmutating check |
|---|---|---|
| No telemetry after successful request | Instrumentation disabled, DB persistence error, or filter mismatch | Compare request response headers and /v1/observability/readiness flags |
| Dashboard shows zero samples | Wrong service/window, empty traffic, or incomplete collection | Read /v1/observability/metrics/summary for the same service and window |
| SLO green despite errors | 5xx-only availability definition, insufficient coverage, or status mismatch | Recalculate N, HTTP 5xx and p95 from accepted samples |
| Same incident has different trace IDs | Gateway/proxy propagation or new client request | Compare Core response, downstream, and log correlation fields |
| Readiness succeeds but dependency fails | Core health is not downstream readiness | Inspect bounded gateway health and target service independently |
| Public status includes identifiers | Public projection or manual-label leak | Stop sharing response; test recursive field allowlist |
| Spike after deployment | Release change or unrelated workload | Correlate release marker and request window; do not infer causality from timing |
4. Architecture — identify which observability plane owns the evidence
The source implements a persisted request/SLO plane through request_tracing.py, services/observability.py, and routers/observability.py. Request metrics can store method, route path, status, duration, request ID and labels; the SLO evaluator aggregates these request samples.
A separate sc.core.unified-runtime-observability-audit-drift-intelligence.v1 contract models runtime health, audit events, drift baselines, traces and snapshots. The inspected router offers contract, reference and validation operations. Its reference records must not be described as measurements from a live fleet. Gateway health and reliability/connector health are further independent sources, not synonyms for request SLOs.
Source anchors: request trace middleware, metrics and SLO service, runtime diagnostic contract router.
5. Actual API surfaces — use the correct visibility level
| Route or behavior | Access and purpose | Caution |
|---|---|---|
GET /v1/observability/readiness |
Internal/read-mode flags, migration and metric count | A ready flag does not attest that every request was sampled |
GET /v1/observability/metrics/summary |
Service/window request counts, 5xx error rate, p95 | Observations are limited by the selected window |
GET /v1/observability/slos/evaluate |
Current source-defined SLO evaluation | States include insufficient_data |
GET /v1/observability/deployments |
Operator-facing release markers | Source route uses a write-key dependency even for reading |
GET /api/v1/observability/status |
Scoped public data:read aggregate |
May return 404 when public status is disabled |
GET /v1/gateway/health |
Internal gateway/downstream status | General health is not a per-request success guarantee |
GET /public/v1/runtime-observability/contract |
Versioned runtime diagnostic contract | A contract response does not establish deployed alert collection |
6. Procedure — establish a nonmutating baseline
Capture the incident time range and record the exact status, response request ID and Core-version header from a single authorized test request. Avoid exporting raw bodies when they contain research data. In staging, use a deliberately anonymous, nonsecret correlation ID:
SC_CORE_BASE="https://STAGING-CORE-EXAMPLE.invalid"
TRACE_ID="obs-smoke-001"
curl --silent --show-error --dump-header response-headers.txt \
--output response-body.json \
-H "X-Request-ID: ${TRACE_ID}" \
"${SC_CORE_BASE}/health"
# Inspect only sanitized headers and status; never publish raw internal files.
Expected middleware behavior in the reviewed source: the response includes X-Request-ID, X-SC-Core-Version and Server-Timing. This does not prove that metrics were stored; confirm sampling separately.
7. Procedure — diagnose missing telemetry without retrying writes
If the request completed but no metric exists, inspect observability_control_plane_enabled and observability_request_metrics_enabled from the authorized readiness response, followed by database migration state and service/window filters. The middleware records metrics after obtaining a response, using request.url.path without query strings. If storage raises an exception, the request remains successful and the middleware emits an error log identified by request ID.
Therefore, HTTP 200 with a correlation header and no metric row is possible. Look for observability_request_metric_failed in restricted logs, but do not disclose exception text or stack traces without review. A successful write operation must not be retried solely because its telemetry is missing.
If instrumentation is disabled by policy, classify the gap as expected unobserved coverage, not zero-error performance. Re-enable only through an approved release with a privacy regression test.
8. Procedure — distinguish no traffic, wrong window and broken collection
For the same exact UTC interval compare (a) the number of accepted HTTP requests known independently from an authorized gateway edge or bounded test harness, (b) count of persisted http_request_duration_ms samples for the selected service, and (c) filter names. A metric series exists only if the configured service name matches the sampled rows. If there are no samples, availability_percent and latency_p95_ms must be null; neither should be converted to 100% uptime or 0 ms.
Check clock skew, missing timestamps, retention compaction, wrong database, partial deployments, and asynchronous collection expectations. The source records one metric row per completed middleware request; it does not claim that an upstream proxy or every dependent worker is represented.
9. Procedure — reproduce SLO mathematics exactly
The reviewed service counts HTTP 5xx statuses as errors. HTTP 401, 403, and 429 are not counted as unavailable by this particular calculation. This operational definition must not be represented as end-user availability or SLO completeness.
Source-aligned calculations: for N request samples and E samples with HTTP status of at least 500, availability is 100 × (N − E) / N, while HTTP 5xx error percentage is 100 × E / N. The p95 is the sorted duration at the nearest-rank position ceil(0.95 × N) (one-based).
from math import ceil
def metrics(statuses, durations_ms):
assert len(statuses) == len(durations_ms)
n = len(statuses)
if n == 0:
return {"availability": None, "p95_ms": None}
five_xx = sum(status >= 500 for status in statuses)
p95_index = max(0, ceil(.95 * n) - 1)
return {
"availability": round(100 * (n - five_xx) / n, 4),
"p95_ms": sorted(durations_ms)[p95_index],
}
assert metrics([200, 200, 429, 200, 200, 503, 200],
[28, 42, 33, 57, 110, 900, 95]) == {
"availability": 85.7143, "p95_ms": 900
}
The accompanying fixture reproduces this result and marks itself synthetic. Recalculate independently before interpreting a dashboard claim.
10. Procedure — interpret SLO state and sampling thresholds
The seeded SLOs in the reviewed documentation target at least 99% request availability and at most 1,000 ms p95 over 60 minutes, with a minimum of five samples. Source rules permit custom SLOs with their own window and minimum count. A state of insufficient_data is not a healthy result or an outage verdict; it means the configured evaluation cannot be supported by the observed sample count.
Check the indicator, target, comparison operator, service, time window and sample threshold. Test both breach and recovery with synthetic staged traffic. Do not modify an SLO target simply to make an incident dashboard green.
11. Procedure — reconcile trace IDs across Core and downstream services
The middleware accepts a bounded, pattern-checked X-Request-ID or creates a new one. Its permitted syntax is letters, digits, dot, underscore, colon and hyphen, up to 64 characters. The gateway forwards correlation data to supported downstream services, but every service/proxy hop requires verification.
# Synthetic correlation audit (NOT a Platform Core endpoint):
client_id = "obs-smoke-001"
core_response_id = "obs-smoke-001"
downstream_id = "obs-smoke-001" # read from approved downstream logs
assert client_id == core_response_id == downstream_id
If a downstream ID is absent, record propagation as unverified, not successful. Avoid using a user ID, email, token, or research-object identifier as a request ID. When redacting a trace, retain only a consistent opaque replacement so events can still be correlated.
12. Procedure — distinguish Core and gateway failures
Compare /health, Core observability readiness, and the gateway health snapshot for the affected product. The gateway separately handles timeouts, unreachable upstream services, circuit breakers, method restrictions and payload-size limits. Internal gateway status may be 200 while one downstream service is degraded; the proxy may also return a sanitized upstream failure.
Classify whether the failure occurred before Core accepted the request, during Core routing, while calling a downstream service, or after the downstream operation completed. Correlation identifiers provide linkage, not proof of causation. A working Core SLO does not validate Workbench, Research, Library, or a provider integration.
13. Procedure — investigate 401, 403, 404, 429 and 503 safely
| Observed response | Interpretation to check | What not to infer |
|---|---|---|
| 401 | Invalid or missing public credential | A target object is missing |
| 403 | Scope, application, or service authorization gate | The request was never observed by Core |
| 404 | Resource absent or intentionally not public; feature disabled | Whether a private record exists |
| 429 | Per-minute or daily quota; check Retry-After |
A 5xx availability error under the source metric definition |
| 503 | Readiness or security configuration, or downstream unavailability | Scientific failure or automatic rollback approval |
| Missing response metric | Instrumentation failure or incomplete coverage | Safe to retry the business write |
14. Procedure — inspect unsafe logging fields before sharing evidence
Automatic metrics persist request paths rather than query strings. This reduces leakage but does not remove sensitive path parameters. A path such as /research/projects/PRIVATE-ID still discloses a stable identifier. Likewise, record_metric(..., labels=...) stores manually supplied labels without a comprehensive server-side secret-stripping step in the inspected function.
Before sharing logs, metrics or screenshots, inspect nested structures for Authorization, Cookie, bearer tokens, API keys, passwords, session identifiers, private project names and raw scientific records. Substitute consistent opaque tokens. Avoid copying full traces, exception stack messages or full HTTP response bodies to public tickets.
Where sensitive diagnostics are found, treat it as a data-handling incident: restrict access, preserve evidence under approved retention, rotate exposed credentials if required, and repair the instrumented field at the source. Do not merely delete an audit trail.
15. Procedure — test public aggregate projection independently
The public route GET /api/v1/observability/status requires a public API credential with data:read; the source gate may return 404 if public status is disabled. Its intended payload includes aggregate sample counts, availability/error rate, p95 latency, SLO states, and limited release markers. The aggregate data payload must not contain individual request IDs, raw samples, query parameters, internal labels, operator metadata, tokens or incident details. The normal response envelope meta.request_id and response X-Request-ID remain legitimate per-request correlation metadata; do not misclassify those separately scoped fields as raw sample disclosure.
# Read-only staging illustration: do not echo or log credentials.
SC_CORE_BASE="https://STAGING-CORE-EXAMPLE.invalid"
# SC_PUBLIC_KEY must be supplied through an approved secret store.
curl --silent --show-error \
-H "Authorization: Bearer ${SC_PUBLIC_KEY}" \
"${SC_CORE_BASE}/api/v1/observability/status"
Confirm the actual authorization and negative cases (missing key, wrong scope, disabled route) using isolated identities. Check nested arrays in the data object, and check envelope metadata against an explicit allowlist. The included packet checker rejects private fields within the synthetic aggregate while permitting a bounded envelope meta.request_id, matching the source’s documented correlation behavior.
16. Procedure — distinguish runtime observability contracts from live data
The v3.97.0 runtime-observability module models diagnostic evidence such as versioned contract health, drift baselines, alert decisions, audit events and snapshots. Source endpoints include /v1/runtime-observability/contract, /v1/runtime-observability/reference and validation operations, with a separate public contract route under /public/v1/runtime-observability/contract. A validated or reference bundle is not proof of persistent live monitoring, alert delivery, or fleet-wide trace coverage.
Likewise, a drift alert or provenance gap requires investigation; it does not automatically mark a scientific claim true or false or authorize graph mutation. Keep research evaluation within the responsible research and review workflow.
17. Procedure — reconcile deployment markers and retention
Deployment markers can record started, deployed, failed, rollback and rolled_back. They help establish chronology, not automatic causality. Record release SHA, image digest, migration state, relevant change authorization and the last known-good state.
Request-metric retention defaults to 720 hours in the inspected settings; compaction is available through an operator write route. A configured retention value does not prove that a retention job has run. Verify policy, scheduled execution, deletion scope and any legal hold. Do not compact or erase logs during an open investigation without approval.
The observability source describes fail-open metric persistence. That protects request availability but can create measurement gaps; document the gap instead of backfilling unobserved results as measured facts.
18. Symptoms — diagnostic patterns that need different responses
- Missing measurement: a response exists, but there is no sample for the request ID or window.
- Unattributable error: a 5xx request can be seen but cannot be connected to a service or downstream trace.
- False green: SLO state appears
metwith insufficient samples or a wrongly interpreted metric definition. - Stale summary: the UI, query window or sample count does not reflect current accepted records.
- Secret disclosure: a route path, manually supplied label, or public response contains a private identifier or credential.
- Lost deployment context: an incident is attributed to a release without a verified deployed digest or bounded before/after samples.
19. Cause — locate the failing boundary
| Boundary | Evidence to collect | Likely remediation owner |
|---|---|---|
| Request middleware | Response request ID, Core version, log marker | Platform Core maintainer |
| Metric persistence | Feature flags, migration status, sample row count | Core database/operations |
| Metric calculation | Service/window, 5xx count, sorted durations | Observability maintainer |
| Gateway proxy | Upstream status, sanitized gateway health, trace linkage | Gateway + downstream owner |
| Public projection | Field allowlist, scope response, nested redaction | API and security reviewer |
| Retention/release | Compaction job receipt, release marker and image digest | Release/operations owner |
| Runtime drift contract | Reference vs live measurement provenance | Runtime component owner |
20. Troubleshooting — execute a bounded diagnostic sequence
- Authorize: identify incident, service owner, environment and read-only scope. Verify the deployed build against the pinned source or record the difference.
- Reproduce safely: use a synthetic read-only staging request with an opaque trace ID. Capture status, Core version, timing and response trace ID.
- Check instrumentation: read feature flags, metric count, migration state, service and time-window filters; search approved logs for a telemetry persistence exception.
- Recompute: build a bounded, sanitized record of request status and latency; recalculate 5xx availability, p95 and SLO state independently.
- Correlate: compare Core, gateway and downstream traces. Mark each missing hop unverified and do not invent causal edges.
- Inspect privacy: audit route parameters, manual labels and public aggregate JSON with a recursive allowlist. Restrict any leaked evidence.
- Reconcile release and retention: check deployment SHA, compaction evidence and any active hold; preserve last accepted artifacts.
- Record outcome: attach the scrubbed result and owner disposition; leave staging/production verification explicitly pending when unperformed.
21. Resolution — prefer narrow reversible changes
Correct a wrong service filter, time window, missing downstream trace configuration or projection mapping in staging first. For a genuine instrumentation defect, add a regression test that reproduces the missing sample or leaked field. Run a disposable database migration/retention exercise when relevant. Require independent code review for changes to telemetry persistence and public responses.
For an unauthorized public disclosure, disable the affected publication path or restrict access under an approved incident procedure, preserve evidence securely, rotate affected credentials if exposed, and verify field-level suppression before re-enabling. For a request-metrics outage, do not reissue non-idempotent writes. For SLO misconfiguration, preserve the old policy, document the proposed semantics, and compare before/after results.
Never treat an SLO alarm as a command to roll back, delete evidence, or change research conclusions. Rollback requires approved change control and verified recovery evidence.
22. Verification — observable evidence, not dashboard appearance
| Acceptance test | Evidence required | Gate |
|---|---|---|
| Authorized request has valid Core and request IDs | Headers and sanitized trace record | Required |
| Every required hop preserves a correlation ID | Matched synthetic Core and downstream trace IDs | Required when propagation is claimed |
| Metric sample count matches independently observed requests | Count reconciliation and missing-sample explanation | Required |
| 5xx availability, p95 and SLO states recompute exactly | Reproducible script output | Required |
| No raw secret or research object appears in logs/labels | Privacy scan and independent reviewer signoff | Required |
| Public status is aggregate-only and scope-gated | Positive and negative credential tests | Required |
| Downstream failure is distinguished from Core failure | Gateway and service-specific status evidence | Required |
| No unsupported deployment or scientific claims | Source/build digest and verification register | Required |
23. Offline diagnostic fixture — reproduce evidence checks
The accompanying Python checker is intentionally not a Platform Core client. It validates a synthetic incident JSON packet using a narrow educational schema: request timestamps and status codes, route privacy, distinct request IDs, independently reported aggregates, SLO state, trace-propagation claims and public-field minimization. It never connects to a network, database or production account.
python3 -m unittest -v test_observability_incident.py
python3 check_observability_incident.py synthetic-observability-incident.json
# Expected: status "pass", 7 samples, 1 HTTP 5xx,
# availability 85.7143%, nearest-rank p95 900 ms.
# This is SYNTHETIC EVIDENCE, not a production health result.
A deliberately changed fixture with a duplicated request ID, false 100% availability, secret-bearing label, mismatched downstream trace or injected private public field must fail. The checker cannot demonstrate that source instrumentation is deployed or that a live service has no undiscovered leaks.
24. Staging acceptance plan — what remains to be executed
The package includes a staging-acceptance-matrix.csv with individually scoped tests for request IDs, fail-open metric writes, 5xx counting, 429 treatment, sample thresholds, gateway attribution, public authorization, sensitive labels, retention and read-back. Each case is marked NOT RUN until performed on an explicitly isolated staging deployment.
Each record should contain the environment/image digest, actual route and feature setting, synthetic input, expected outcome, observed status/body hash, sanitized trace ID, privacy result, reviewer and disposition. Do not use production private research to construct demonstration fixtures. Promote a fix only after the negative access and privacy checks pass.
25. Scientific interpretation — operational health is not evidence validity
A healthy request path confirms that a service was responsive under one operational definition. It does not validate model assumptions, units, source licensing, data completeness, computational correctness, publication eligibility, or scientific truth. Conversely, a failed availability target does not automatically invalidate a prior research result.
Keep observational telemetry in operational records with controlled retention. Scientific validation continues to require independently inspectable inputs, algorithms, provenance, uncertainty and review decisions. Diagnostic anomalies may trigger revalidation; they must not silently mutate evidence or approval states.
26. Technical references — pinned implementation and release boundaries
Reviewed commit: 59b8444365525a58fd4f6a7e29a20d712769e1a2. These links identify repository source, not the hash of a production deployment. A staging operator must record the actual running image digest and configuration separately.
- Request tracing middleware — correlation, Server-Timing, exception logging
- Request aggregation, p95, SLO evaluation and retention
- Actual internal and public observability routes
- Metric sample, SLO and deployment marker model fields
- Observability feature flags and defaults
- Gateway health and error response boundary
- Downstream timeout and version reporting
- Public credentials, scopes, quota and request IDs
- Reference contract and validation endpoints
- Runtime diagnostic object contract
- Source repository observability tests
- Runtime observability contract tests
- Operational SLO and privacy boundaries
- Runtime drift epistemic limits
- Incident and rollback boundaries
Verification classification: source-reviewed editorial guidance plus independently runnable synthetic checks. No deployed-service validation, actual retention audit or security certification is implied.
