Releases: Pr0Ger/go-logger
Releases · Pr0Ger/go-logger
Errors wrapping
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 aswrapped<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
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
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
- Bump sentry-go to 0.7.0
- Add request id as a tag for sentry events
Yet another release
- 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()
onhttp.ResponseWriter
before event is sent otherwise this will not work
- Remove dependency from github.com/go-chi/chi/middleware
It's better than before
- 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
v1.0.0 Add fancy README.md for convincing you to use this library
v0.5.1
Initial release
v0.5.0 Finish work on request logger middleware