Skip to content

feat(core)!: release v2 — migrate to Fiber v3, cut /v2 major#31

Merged
rodrigodh merged 7 commits into
mainfrom
develop
Jul 21, 2026
Merged

feat(core)!: release v2 — migrate to Fiber v3, cut /v2 major#31
rodrigodh merged 7 commits into
mainfrom
develop

Conversation

@rodrigodh

Copy link
Copy Markdown
Contributor
Lerian

Lib Observability


Description

Release of the v2 major to main (stable). Migrates the library to Fiber v3 and cuts the /v2 module path (github.com/LerianStudio/lib-observability/v2).

Affected packages: middleware, tracing, runtime, zap, assert, metrics, log, plus module metadata (go.mod/go.sum).

Type of Change

  • BREAKING CHANGE: Consumers must update their integration
  • feat: New feature or capability
  • build: Build system, Go module dependencies

Breaking Changes

  • Module path bumped to /v2 — import path is now github.com/LerianStudio/lib-observability/v2/.... Downstream services must update every import and run go mod tidy.
  • Fiber v3 — HTTP middleware now targets gofiber/fiber/v3; consumers still on Fiber v2 must migrate.

Testing

  • make test passes
  • make lint passes

Test evidence / Actions run: CI on develop.

Architectural Checklist

  • No panic() in production paths — uses assert helpers or wrapped errors
  • Backwards-compatible by default; breaking changes flagged above
  • No lib-commons import (circular — see CLAUDE.md)

Related Issues

Closes #

lerian-studio and others added 4 commits June 16, 2026 14:32
Bump gofiber/fiber v2.52.13 -> v3.4.0 (v2 dropped) and cut the /v2
module major. fiber.Ctx is now an interface passed by value: all
*fiber.Ctx signatures across middleware/ and tracing/ drop the pointer.
c.UserContext()/SetUserContext() -> c.Context()/SetContext(); app.Add
now takes []string. No behavior change intended.

BREAKING CHANGE: module path is now
github.com/LerianStudio/lib-observability/v2 and exported HTTP helpers
take fiber.Ctx by value; consumers must be on Fiber v3.

X-Lerian-Ref: 0x1
Fiber v3 pulls golang.org/x/crypto via acme/autocert; the openpgp
unmaintained advisory has no fixed version and the package is not imported.
Matches the suppression already present on other services' develop.

X-Lerian-Ref: 0x1
feat(core)!: migrate to Fiber v3, cut /v2 major
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c039af18-6768-4647-b0af-d8bd3d702a59

📥 Commits

Reviewing files that changed from the base of the PR and between a5929cd and c8949f2.

📒 Files selected for processing (1)
  • README.md

📝 Walkthrough

Walkthrough

The project adopts the /v2 module path and Fiber v3, updates observability imports, changes Fiber contexts from pointers to values, migrates request context storage to Fiber’s context APIs, and updates middleware, tracing, logging, and tests. A dated Trivy ignore entry is also added.

Changes

Module and HTTP API migration

Layer / File(s) Summary
Module path and dependency migration
go.mod, assert/*, runtime/*, system*, tracing/*, zap/*, .trivyignore, README.md
The module moves to /v2, Fiber moves to v3, observability imports are versioned, documentation is updated, and the Trivy ignore entry is added.
Fiber context and telemetry flow
middleware/helpers.go, middleware/telemetry.go, middleware/tenant.go, tracing/otel.go, middleware/*test.go
Fiber handlers and exported helpers use fiber.Ctx values; request state, trace extraction, tenant attributes, correlation IDs, and span lifecycle use Context() and SetContext().
HTTP logging context migration
middleware/logging.go, middleware/logging_obfuscation.go, middleware/logging_test.go
HTTP logging, body obfuscation, logger propagation, and access-log assertions are updated for Fiber v3 and Fiber context storage.
Assertion and metrics consumers
assert/*, metrics/*, context_tracking_test.go
Assertion and metrics code and tests resolve shared observability packages from the /v2 module path.

Sequence Diagram(s)

sequenceDiagram
  participant FiberCtx
  participant WithTelemetry
  participant ExtractHTTPContext
  participant MetricsFactory
  FiberCtx->>WithTelemetry: provide fiber.Ctx
  WithTelemetry->>ExtractHTTPContext: extract trace context from c.Context()
  ExtractHTTPContext-->>WithTelemetry: propagated context
  WithTelemetry->>FiberCtx: store telemetry state with SetContext
  WithTelemetry->>MetricsFactory: record request duration from c.Context()
Loading

Possibly related PRs

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch develop

Comment @coderabbitai help to get the list of available commands.

@lerian-studio

lerian-studio commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🔒 Security Scan Results — lib-observability

✅ PR Mergeable — no blocking findings

Stage Status Blocking?
Filesystem Scan ✅ Clean
Docker Image Scan ➖ Skipped
Docker Hub Health Score ➖ Skipped
Pre-release Version Check ✅ Clean

Trivy

Filesystem Scan

✅ No vulnerabilities or secrets found.


Pre-release Version Check

✅ No unstable version pins found.


🔍 View full scan logs

@lerian-studio lerian-studio added size/M PR changes 200–499 lines log Structured logging primitives middleware HTTP/gRPC observability middleware runtime Runtime introspection tracing Distributed tracing core Top-level public API surface tests Unit, integration and end-to-end tests metrics Metrics instrumentation assert Assertion helpers zap Zap logger integration deps Go module dependencies (usually opened by Dependabot) labels Jul 21, 2026
@lerian-studio

lerian-studio commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🔍 PR Validation Summary

✅ PR Mergeable — no blocking failures

Check Status Blocking
Source Branch ✅ success yes
PR Title ✅ success yes
PR Description ✅ success yes
PR Size ✅ success no
Auto Labels ✅ success no
PR Metadata ✅ success no

🔍 View workflow run

@lerian-studio

Copy link
Copy Markdown
Contributor

📊 Unit Test Coverage Report: lib-observability

Metric Value
Overall Coverage 85.7% ✅ PASS
Threshold 80%

Coverage by Package

Package Coverage
github.com/LerianStudio/lib-observability/v2/assert 97.9%
github.com/LerianStudio/lib-observability/v2/constants 83.3%
github.com/LerianStudio/lib-observability/v2/log 94.9%
github.com/LerianStudio/lib-observability/v2/metrics 91.4%
github.com/LerianStudio/lib-observability/v2/middleware 76.9%
github.com/LerianStudio/lib-observability/v2/redaction 95.8%
github.com/LerianStudio/lib-observability/v2/runtime 80.4%
github.com/LerianStudio/lib-observability/v2/tracing 84.8%
github.com/LerianStudio/lib-observability/v2/zap 96.0%
github.com/LerianStudio/lib-observability/v2 91.5%

Generated by Go PR Analysis workflow

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.trivyignore:
- Line 5: Update the GO-2026-5932 entry in .trivyignore by either renewing its
expiration with a responsible owner or tracking issue, or removing the ignore if
the advisory is no longer reachable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 13b6190b-d326-4fcf-8690-b3fd3a970a82

📥 Commits

Reviewing files that changed from the base of the PR and between 082fb16 and eb521b5.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (42)
  • .trivyignore
  • assert/assert.go
  • assert/assert_extended_test.go
  • assert/assert_test.go
  • context_tracking_test.go
  • go.mod
  • log/go_logger.go
  • metrics/metrics.go
  • metrics/metrics_test.go
  • middleware/context_span.go
  • middleware/context_span_test.go
  • middleware/helpers.go
  • middleware/helpers_test.go
  • middleware/logging.go
  • middleware/logging_obfuscation.go
  • middleware/logging_test.go
  • middleware/metrics.go
  • middleware/request_attrs.go
  • middleware/telemetry.go
  • middleware/telemetry_metrics_test.go
  • middleware/telemetry_route_test.go
  • middleware/telemetry_test.go
  • middleware/tenant.go
  • middleware/tenant_test.go
  • observability.go
  • runtime/goroutine.go
  • runtime/helpers_test.go
  • runtime/log_mode_link_test.go
  • runtime/metrics.go
  • runtime/metrics_test.go
  • runtime/recover.go
  • runtime/tracing.go
  • system.go
  • system_test.go
  • tracing/obfuscation.go
  • tracing/obfuscation_test.go
  • tracing/otel.go
  • tracing/otel_test.go
  • tracing/processor.go
  • tracing/v2_test.go
  • zap/zap.go
  • zap/zap_test.go

Comment thread .trivyignore
Resolves CVE-2026-56852 (infinite loop on invalid input) flagged as a
blocking finding by the Trivy filesystem scan. x/text is an indirect
dependency (Fiber v3, grpc-gateway, fasthttp, x/crypto, x/net).

X-Lerian-Ref: 0x1
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 21, 2026
@lerian-studio lerian-studio added the docs Documentation, llms.txt and markdown content label Jul 21, 2026
@rodrigodh
rodrigodh merged commit a7c04dc into main Jul 21, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assert Assertion helpers core Top-level public API surface deps Go module dependencies (usually opened by Dependabot) docs Documentation, llms.txt and markdown content log Structured logging primitives metrics Metrics instrumentation middleware HTTP/gRPC observability middleware runtime Runtime introspection size/M PR changes 200–499 lines tests Unit, integration and end-to-end tests tracing Distributed tracing zap Zap logger integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants