v4.0.0-beta.1
Fries v4.0.0-beta.1
This is the first beta release of Fries 4.x.
Fries 4.x is a major version update focused on aligning the project with Kratos v3 and Go's standard library log/slog. This release also updates module paths to /v4, refreshes component APIs, and removes legacy Kratos logging integrations that are no longer suitable for the 4.x line.
Because this is a beta release, APIs are intended to represent the 4.x direction, but minor adjustments may still happen before the stable v4.0.0 release.
Highlights
Kratos v3 support
Fries integrations have been upgraded from github.com/go-kratos/kratos/v2 to github.com/go-kratos/kratos/v3.
This affects Kratos middleware, transport-related helpers, error helpers, and related examples.
Standard library slog migration
Logging-related components now use Go's standard log/slog model.
Notable changes:
- Added
log/slog/multi - Added
log/slog/syslog - Migrated component loggers to
*slog.Logger - Migrated HTTP framework loggers for
chi,gin, andhttp/server - Migrated Kratos wrapper component logging to slog
- Migrated OTLP lifecycle logs to slog
- Removed legacy
kratos/log/*components
For OpenTelemetry log bridging, use the official go.opentelemetry.io/contrib/bridges/otelslog package.
Module and package cleanup
The repository module line has moved to /v4.
The previous contract module has been renamed to capability:
github.com/go-fries/fries/contract/v4should be replaced with:
github.com/go-fries/fries/capability/v4OpenTelemetry alignment
Kratos v3 telemetry behavior has been aligned for 4.x.
Instrumentation scope names now follow the v4 package paths. If your dashboards, collectors, or tests match scope names or scope versions, review and update those matchers.
Server lifecycle behavior
HTTP server-related components keep the standard net/http behavior around http.ErrServerClosed.
For callers that want to ignore normal server shutdown errors, http/server provides an explicit helper.
Breaking Changes
- Module paths now use
/v4. - Kratos dependencies now use
github.com/go-kratos/kratos/v3. - Component logger options now use
*slog.Logger. kratos/log/multiwas removed. Uselog/slog/multi.kratos/log/syslogwas removed. Uselog/slog/syslog.kratos/log/otelwas removed. Usego.opentelemetry.io/contrib/bridges/otelslog.contract/v4was renamed tocapability/v4.- OTel instrumentation scope names now follow v4 package paths.
Migration Notes
- Replace Fries imports from
/v3to/v4. - Replace Kratos imports from
/v2to/v3. - Replace
contract/v4imports withcapability/v4. - Replace Kratos log components:
kratos/log/multi->log/slog/multikratos/log/syslog->log/slog/syslogkratos/log/otel->go.opentelemetry.io/contrib/bridges/otelslog
- Update logger configuration to pass
*slog.Logger. - Review OTel scope name and scope version matchers.
- Run module tests and lint after import updates.
What's Changed
v4 baseline
- chore(ci): run workflows on 4.x by @flc1125 in #2532
- chore(modules): migrate repository modules to v4 by @flc1125 in #2534
- chore(release): update v4 release metadata by @flc1125 in #2536
- chore(docs): update v4 module documentation by @flc1125 in #2537
- chore(proto): document internal buf lint ignores by @flc1125 in #2538
- chore: merge 3.x into 4.x by @flc1125 in #2564
Logging
- feat(log): add slog multi handler by @flc1125 in #2566
- feat(log): add slog syslog handler by @flc1125 in #2567
- refactor(log): retire kratos log components by @flc1125 in #2569
- refactor(log): migrate component loggers to slog by @flc1125 in #2576
- refactor(log): migrate http framework loggers to slog by @flc1125 in #2577
- refactor(log): migrate kratos wrapper logging to slog by @flc1125 in #2578
- refactor(log): migrate otlp lifecycle logs to slog by @flc1125 in #2580
Kratos v3 and integrations
- chore(kratos): upgrade integrations to kratos v3 by @flc1125 in #2581
- fix(errors): align with kratos v3 error helpers by @flc1125 in #2582
- fix(transport): clarify server closed behavior by @flc1125 in #2583
- fix(otel): align kratos v3 telemetry behavior by @flc1125 in #2584
Cleanup and docs
- refactor(capability)!: rename contract module by @flc1125 in #2587
- docs: update 4.x README examples by @flc1125 in #2588
- chore: merge 3.x into 4.x by @flc1125 in #2592
- Release v4.0.0-beta.1 by @flc1125 in #2598