跳转到内容

v1.9.1

发布于 2025-10-02GitHub Release

  • Logging enhancements:
    • Customize log key names to fit your log schema and downstream tooling.
    • Prefer json.Marshaler over fmt.Stringer when emitting JSON logs, improving correctness and structure.
  • REST/SSE stability and operability:
    • Fix SSE handler blocking and reduce noisy logs by downgrading SetWriteDeadline errors to debug.
    • Add SetSSESlowThreshold to help detect slow clients and long writes.
  • Diagnostics and performance:
    • Improved mapreduce panic stacktraces for faster root-cause analysis.
    • Optimized machine performance data reading to reduce runtime overhead.
  • Support customizing log keys so you can align emitted fields (e.g., time, level, caller, message) to your organization’s conventions or ingestion pipeline requirements.
    PR: feat: support customize of log keys by @WqyJh (@5103)
  • Prefer json.Marshaler over fmt.Stringer when generating JSON logs, ensuring structured fields are serialized using their explicit JSON representations rather than ad-hoc strings.
    PR: feat: prefer json.Marshaler over fmt.Stringer for JSON log output by @WqyJh (@5117)
  • Fix SSE handler blocking behavior that could stall responses under certain conditions.
    PR: fix: SSE handler blocking by @wuqinqiang (@5181)
  • Reduce log noise for transient I/O conditions by downgrading SetWriteDeadline errors to debug level in REST SSE.
    PR: fix(rest): change SSE SetWriteDeadline error log to debug level by @wuqinqiang (@5162)
  • Add sseSlowThreshold to surface slow SSE writes, enabling better observability about backpressure or slow clients.
    PR: feat(handler): add sseSlowThreshold by @wuqinqiang (@5196)
  • Improve panic stacktrace reporting in mapreduce, making error contexts clearer and debugging faster.
    PR: optimize: mapreduce panic stacktrace by @kevwan (@5168)
  • Optimize machine performance data reading to lower collection overhead and reduce runtime impact.
    PR: opt: optimization of machine performance data reading by @wanwusangzhi (@5174)
  • Fix gRPC → HTTP mapping issue in gateway.
    PR: fix: issue-5110 by @guonaihong (@5113)
  • Logging key customization:
    • If you rely on specific field names in log pipelines, consider setting the new custom key configuration to preserve schema consistency.
  • JSON log output:
    • If your types implement json.Marshaler, expect more accurate JSON in logs. If you previously depended on stringified representations, review downstream consumers to ensure compatibility.
  • SSE tuning:
    • Consider using SetSSESlowThreshold to flag slow clients or network conditions in environments sensitive to latency.
    • The SetWriteDeadline log level change reduces noise; adjust logger settings if you still want to surface these events.
  • Thanks to all contributors in this release: @WqyJh, @guonaihong, @wanwusangzhi, @kevwan, @wuqinqiang, and first-time contributor @Copilot. Your work improves performance, reliability, and developer ergonomics for everyone using go-zero.