What problem does it solve?
It resolves breaking or inefficient observability migration when moving from per-internal-package middleware/tracing/metrics codegen to the interceptor-based observability libraries in forge/pkg/observe.
Core Features & Use Cases
- Removes stale generated wrappers: ensures middleware_gen.go, tracing_gen.go, and metrics_gen.go are removed while keeping mock_gen.go intact.
- Rewires server observability correctly: moves canonical wiring to observe.DefaultMiddlewares(...) with project-specific interceptors passed as Extras.
- Guides manual code updates: helps you replace direct references to Instrumented/Traced/Metric wrapper types and adjust inner-call observability using TraceCall or related helpers when needed.
Use this when forge upgrade indicates you are crossing the version that introduced forge/pkg/observe (typically 1.6.x → 1.7.x) and your generated and wired observability code no longer matches the new recommended architecture.
Quick Start
Run forge generate, then verify no middleware_gen.go, tracing_gen.go, or metrics_gen.go files remain under internal/ before rebuilding and testing the project.