backend requirements onthe xustomer app
This commit is contained in:
7
main.go
7
main.go
@@ -167,6 +167,13 @@ func main() {
|
||||
AllowMethods: "GET,POST,PUT,DELETE,PATCH,OPTIONS",
|
||||
}))
|
||||
|
||||
// Echo X-Request-Id on every response, errors included, minting one when the
|
||||
// caller did not send it. The customer app funnels every failure into a
|
||||
// single retryable error state, so without this a support conversation
|
||||
// about "it failed" has nothing to correlate against the logs. Registered
|
||||
// before the logger so the id is available to it.
|
||||
app.Use(middlewares.RequestID())
|
||||
|
||||
// Structured Zap logger middleware
|
||||
app.Use(middlewares.ZapLogger())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user