Skip to content

feat!: implement the v2 observability contract - #24

Merged
janisto merged 18 commits into
mainfrom
codex/align-observability-implementation
Jul 22, 2026
Merged

feat!: implement the v2 observability contract#24
janisto merged 18 commits into
mainfrom
codex/align-observability-implementation

Conversation

@janisto

@janisto janisto commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Pull Request

Why

Prepare the next major version as an intentionally breaking, privacy-first
observability API. The existing v1 module remains available at the unsuffixed
path; this branch establishes the /v2 module and behavior.

What changed

  • Move the module and public imports to /v2 and remove v1 compatibility
    shims.
  • Make path, direct peer IP, and User-Agent capture independent opt-ins and
    rename the portable field from remote_ip to peer_ip.
  • Add immutable W3C Trace Context Level 1/Level 2 selection and harden request
    IDs, provider presets, status and panic handling, NDJSON framing, and field
    ownership.
  • Preserve Echo-native route, response-status, and recovery semantics while
    expanding adversarial regression coverage.
  • Add a production-shaped consumer image and a conditional build-only CI
    diagnostic with Podman-first local tooling.

Validation

  • just qa: passed
  • git diff --check: passed
  • Additional checks: just mutation passed with 98.85% efficacy; the consumer
    image built and ran with Podman

Compatibility and risk

  • Compatibility impact: Intentional major-version break. Consumers must use
    the /v2 import path, explicitly enable privacy-sensitive fields, migrate
    remote_ip queries to peer_ip, and adopt the documented v2 configuration.
  • Security and privacy impact: Raw path, direct peer IP, and User-Agent are
    omitted by default; input and field-ownership checks reject ambiguous or
    spoofed metadata.
  • Failure mode and remaining risk: Unmigrated applications fail to compile or
    observe intentionally omitted or renamed fields. Applications must preserve
    the documented middleware order. No module is published by this pull request.

Documentation and changelog

Updated README, examples, maintainer guidance, release and security
documentation, issue forms, consumer image documentation, and CHANGELOG.md.
All v2 entries remain under ## [Unreleased].

janisto added 18 commits July 19, 2026 12:36
BREAKING CHANGE: Align privacy defaults, correlation, lifecycle behavior, and portable route identity with the shared observability specification.
BREAKING CHANGE: module imports now use github.com/janisto/echo-observability/v2.
BREAKING CHANGE: v2 removes legacy compatibility and adopts the documented request, trace, privacy, lifecycle, and provider-profile APIs.
BREAKING CHANGE: v2 uses the aligned configuration, correlation, lifecycle, provider-profile, and NDJSON behavior without v1 compatibility shims.
BREAKING CHANGE: v2 preserves framework-native routes and selected-profile field ownership without v1 compatibility behavior.
@github-actions github-actions Bot added documentation Improvements or additions to documentation api Public API surface or compatibility ci Continuous integration workflows and checks github-actions Pull requests that update GitHub Actions code tests tests packaging Go module metadata, builds, or artifacts labels Jul 22, 2026
@janisto janisto self-assigned this Jul 22, 2026
@janisto
janisto marked this pull request as ready for review July 22, 2026 17:25
@janisto
janisto merged commit 44bd68b into main Jul 22, 2026
8 checks passed
@janisto
janisto deleted the codex/align-observability-implementation branch July 22, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Public API surface or compatibility ci Continuous integration workflows and checks documentation Improvements or additions to documentation github-actions Pull requests that update GitHub Actions code packaging Go module metadata, builds, or artifacts tests tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant