Skip to content

Releases: Pr0Ger/go-logger

Errors wrapping

01 Feb 01:15
Compare
Choose a tag to compare

Versions:

  • Bump go.uber.org/multierr from 1.8.0 to 1.9.0
  • Bump github.com/getsentry/sentry-go from 0.16.0 to 0.17.0

Features:

  • Errors created by fmt.Errorf("wrap: %w", err) will report their type as wrapped<err type> instead of useless *fmt.wrapError
    This will improve usefulness of issues list in Sentry for most cases and should not affect issues grouping (since it is done by stacktrace matching by default)

More info

12 Dec 21:21
Compare
Choose a tag to compare

Versions:

  • Bump go.uber.org/zap to 1.24.0
  • Bump github.com/getsentry/sentry-go to 0.16.0

Changes:

  • Add ExtraFields middleware
    It allows you to inject some fields aftermath. For example:
router.Use(logger.RequestLogger(log))   // Injects logger into request context
router.Use(AuthMiddleware)              // Check auth and inject user info into context or throw 401
router.Use(logger.WithExtraFields(...)) // Grab user info from previous middleware and add it to logger

Tracing is fun

31 Oct 23:55
Compare
Choose a tag to compare

Versions:

  • Minimum supported Go version is 1.16
  • Bump sentry-go to 0.11.0
  • Bump zap to 1.19.1

Changes:

  • Add tracing support to HTTP middleware and BreadcrumbTransport
  • Enrich Sentry event info with data from HTTP request
  • Remove X-Request-Id header from middleware
    • Context helpers still works to avoid code breaking
    • You should use Sentry trace ID instead
  • Add support for creating forked logger
    • It's something like what already happening inside HTTP middleware
    • It's a logger with same cores but with new sentry.Hub
    • This is useful when you have request-based system built not on top of HTTP (something like gRPC or else)

Small fixes is never bad

22 Jul 22:58
1be95f0
Compare
Choose a tag to compare
  • Bump sentry-go to 0.7.0
  • Add request id as a tag for sentry events

Yet another release

21 Jul 22:01
b9d41c9
Compare
Choose a tag to compare
  • Add support for X-Request-Id header:
    • Parse from request headers
    • Generate random ID if not provided
    • ID is available in request context
  • Add support for X-Sentry-Id header
    • Sentry EventID will be added as a header when event is emitted
    • You should not call .Write() on http.ResponseWriter before event is sent otherwise this will not work
  • Remove dependency from github.com/go-chi/chi/middleware

It's better than before

01 May 22:28
f99bbd6
Compare
Choose a tag to compare
  • Support chained errors using Unwrap
  • Report chain of errors when available
  • Squashed one bug because I can make stupid mistakes too

You can use it now

16 Apr 23:59
f4b5ad2
Compare
Choose a tag to compare
v1.0.0

Add fancy README.md for convincing you to use this library

v0.5.1

16 Apr 10:26
0555591
Compare
Choose a tag to compare
  • Fix bug caused by broken backward compatibility in sentry-go

Initial release

15 Apr 23:38
7f96896
Compare
Choose a tag to compare
v0.5.0

Finish work on request logger middleware