Skip to content

Add a standalone observability crate - #87

Draft
lucarlig wants to merge 2 commits into
mainfrom
user/luca/structured-logging
Draft

Add a standalone observability crate#87
lucarlig wants to merge 2 commits into
mainfrom
user/luca/structured-logging

Conversation

@lucarlig

@lucarlig lucarlig commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add contextforge-data-plane-observability as a standalone workspace crate owning structured JSON formatting, request correlation, W3C trace propagation, OTLP exporters, and performance timers
  • emit newline-delimited JSON with stable service, deployment, transaction, correlation, trace, span, pseudonymous user, severity, component, message, and error fields
  • preserve or generate request IDs and propagate ContextForge and W3C context to backend transports even when OTLP export is disabled
  • record authenticated users only as truncated SHA-256 pseudonyms; never log raw subjects, authorization data, request/response bodies, session IDs, resource URIs, or progress tokens
  • emit request, Redis, and backend-call latency as structured PERFORMANCE events
  • migrate every production tracing call site to stable messages and queryable fields, and sanitize integration-test/load-driver diagnostics
  • document crate ownership, middleware behavior, configuration, filtering fields, and privacy rules

Standards coverage

The implementation covers the applicable logging contract: required common fields, structured error context, transaction/correlation propagation, W3C trace/span IDs, startup metadata, severity conventions, sensitive-data exclusions, and request/database/external-call latency. The dataplane has no application queue or configured CPU/memory alert thresholds, so those conditional event classes are not emitted.

Validation

  • cargo fmt --all --check
  • cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo nextest run --locked --workspace
  • cargo deny check advisories licenses
  • cargo build --locked --workspace
  • cargo shear --check-test-targets --deny-warnings --locked
  • mdbook build _context/wiki
  • mdbook test _context/wiki
  • startup JSON smoke check
  • repository pre-commit hooks, including secret scanning

Not run: the Goose load test because the local dependency stack was not active.

Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
@lucarlig lucarlig changed the title Add structured JSON logging Add a standalone observability crate Aug 11, 2026
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