Skip to content

Add observability architecture: tiered retention, log-sink contract, profile opt-in - #385

Open
RonaldHensbergen wants to merge 1 commit into
mainfrom
feature/observability-tiered-retention-174
Open

Add observability architecture: tiered retention, log-sink contract, profile opt-in#385
RonaldHensbergen wants to merge 1 commit into
mainfrom
feature/observability-tiered-retention-174

Conversation

@RonaldHensbergen

@RonaldHensbergen RonaldHensbergen commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Establishes the design foundation for #174 (long-term observability epic: tiered Docker log retention and structured runtime events).

This PR delivers the architectural pieces called out in #174's acceptance criteria — architecture guidance, structured event fields, module-agnostic profile opt-in, and redaction/query guidance — while explicitly respecting #174's ownership boundary against #219 (named DB connections) and #167 (event persistence).

Changes

  • docs/observability.md — ADR-style guidance: two-tier retention design (short-retention raw logs vs. longer-retention structured events), the log-sink contract, profile-level opt-in pattern, redaction guidance, non-mandatory recommended pipelines, and example operator incident queries.
  • schemas/structured-event.schema.json — provider-neutral JSON Schema for the structured event record: required service/profile/environment/timestamp/severity, optional correlationId/workloadId/resource/recordCount/retryCount/message.
  • shared/contracts/log-sink.yaml — new shared contract (kind: log-sink) a centralized log collector module can provide, following the existing sql-database/cache-service contract pattern so nothing hardcodes a specific logging vendor.
  • schemas/profile.schema.json + cli/validator.py — adds an optional spec.observability.logShipping block. A profile can enable log shipping and declare retention tiers without naming a module; sink.contractRef is only needed to pin a specific log-sink provider, reusing the existing <module-id>.<contract-name> resolution already used by spec.outputs.contracts.
  • docs/architecture.md — links the new doc from the existing "logging and monitoring integration points" bullet.
  • tests/test_validator.py — unit coverage for validate_observability_config: shape validation, retention bounds (structuredDays >= rawDays), and sink.contractRef resolution/kind-matching.

Validation

  • make check (lint + full unit test suite, 426 tests) passes.
  • cds validate local-dagster-postgres-superset still passes (no regression to existing profiles, since spec.observability is optional).
  • Manually validated the new log-sink contract against schemas/contract.schema.json.

Out of scope (per #174 and this doc's own "out of scope" section)

Progresses #174 (left open for follow-up implementation work, per its long-term/epic nature).

…profile opt-in

Establishes the design foundation for #174 (long-term observability epic):

- docs/observability.md: ADR-style guidance covering the two-tier retention
  model (short-retention raw logs vs. longer-retention structured events),
  redaction guidance, recommended pipelines, and operator incident-query
  examples. Documents the ownership boundary against #219 (cds-runtime
  named connections) and #167 (backend-portable event persistence) per
  #174's stated scope.
- schemas/structured-event.schema.json: provider-neutral JSON Schema for the
  structured event record (service, profile, environment, timestamp,
  severity, plus optional correlationId/workloadId/resource/counters).
- shared/contracts/log-sink.yaml: new shared contract a centralized log
  collector module can provide (host/port/protocol/ingestPath/retention),
  following the existing sql-database/cache-service contract pattern so no
  module or profile hardcodes a specific logging vendor.
- schemas/profile.schema.json + cli/validator.py: adds an optional, generic
  spec.observability.logShipping block so a profile can opt into log
  shipping and declare retention tiers without naming a specific module;
  sink.contractRef is only required to pin a specific log-sink provider,
  reusing the same <module-id>.<contract-name> resolution already used by
  spec.outputs.contracts.
- tests/test_validator.py: unit coverage for the new
  validate_observability_config validation rules (shape, retention bounds,
  contractRef resolution/kind matching).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant