Skip to content

[FLO-OBS-05] Build the selected reusable observability package #19

Description

@szmyty

Parent: #14
Depends on: FLO-OBS-04 / #18

Outcome

If #18 selects a shared package, implement and publish the smallest independently usable Rust observability support layer proven by the pilots.

Until #18 is accepted, this issue remains a conditional execution checkpoint. If repository-local adapters are selected, close or reshape this issue with the decision evidence rather than creating a package anyway.

Scope

The selected package should own only cross-cutting mechanics and policy projections:

  • composable tracing layers and an embedding-safe subscriber builder;
  • fallible CLI initialization that never panics when a subscriber already exists;
  • human stderr and JSON Lines stderr/file formatting presets;
  • verbosity/filter/color/terminal/sink configuration resolved from explicit inputs;
  • common resource/event/field helpers from [FLO-OBS-01] Define the suite observability, privacy, and stream contract #15;
  • source-aware redaction and defense-in-depth field filtering;
  • bounded asynchronous writer/flush guards;
  • OpenTelemetry bridge configuration and resource mapping;
  • optional OTLP exporter integration proven by [FLO-OBS-03] Prove opt-in OpenTelemetry logs, metrics, and traces #17;
  • W3C context extraction/injection helpers with explicit allowlists;
  • in-memory sinks/exporters and conformance-test helpers;
  • a narrow diagnostic API for initialization/export failures.

The package must not own:

  • product command parsers;
  • domain diagnostics or error categories;
  • run manifests, evidence, checkpoints, artifacts, or validation;
  • provider selection or execution;
  • global subscriber policy for embedding applications;
  • product-specific event vocabularies beyond registered common fields;
  • CLI banner artwork.

Feature and dependency design

Use evidence from #18 to finalize names, but preserve these properties:

  • Minimal default feature set with no network exporter.
  • Human formatting, JSON Lines, file rotation, OpenTelemetry bridge, OTLP transport, and test support are independently selectable where practical.
  • Unsupported or unsafe feature combinations fail at build/configuration time.
  • OpenTelemetry dependencies and runtime/TLS choices remain optional.
  • No async runtime becomes mandatory for consumers that use only local human logging.
  • Supported MSRV and edition are explicit.
  • unsafe is forbidden unless an accepted decision explicitly authorizes a narrowly audited use.
  • Dependency licenses, advisories, provenance, SBOM, and update ownership are recorded.
  • Public APIs use semantic versioning and expose builders/layers rather than product-specific macros wherever possible.

Required behavior

  • Constructing a layer does not install it globally.
  • CLI convenience initialization returns a typed result and a lifetime/flush guard.
  • Repeated or embedding-controlled initialization never panics.
  • Dropping/shutting down the guard has a bounded duration.
  • Export and file sinks remain inactive unless explicitly configured.
  • Sensitive wrapper types cannot be accidentally formatted into ordinary fields without an explicit reveal operation.
  • Metric labels pass cardinality/privacy validation.
  • Trace propagation helpers refuse unapproved destinations.
  • Telemetry failures never mutate a domain outcome implicitly.
  • Human formatting remains accessible without color.

Acceptance criteria

  • The package location, name, owners, release process, MSRV, and feature matrix match accepted [FLO-OBS-04] Decide shared observability crate and repository ownership #18 evidence.
  • Default builds perform no network access and avoid exporter/network dependencies.
  • Layer-only embedding and CLI convenience initialization are both demonstrated.
  • Human, JSON Lines, rotating-file if selected, in-memory, and OpenTelemetry modes have focused tests.
  • Redaction covers secrets, environment values, argv, URLs/headers, paths, source-derived content, and error chains.
  • Queue, truncation, rotation, flush, timeout, shutdown, and exporter failure are bounded and tested.
  • Feature-disabled and feature-enabled MSRV/platform matrices pass.
  • Package contents, licenses, SBOM/provenance, docs, examples, changelog, and compatibility policy are release-ready.
  • An immutable pre-1.0 release is published and consumable without a source/path dependency.
  • A rollback guide explains how a holon returns to its repository-local adapter.
  • No holon must release in lockstep with the package.

Explicit non-goals

Roadmap-Track: FLO-OBS

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions