Skip to content

Commit 6d71370

Browse files
authored
Merge pull request #611 from TaloDev/develop
Release 0.87.4
2 parents d3cc6a3 + 801a4ac commit 6d71370

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "game-services",
3-
"version": "0.87.3",
3+
"version": "0.87.4",
44
"description": "",
55
"main": "src/index.ts",
66
"scripts": {

src/middleware/http-tracing-middleware.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export default async function httpTracingMiddleware(ctx: Context, next: Next) {
104104
ctx.res.on('finish', () => {
105105
setTraceAttributes({
106106
...buildHeaders('response', ctx.response.headers),
107-
'http.status': ctx.status,
108107
'http.response_size': ctx.response.length,
109108
'http.response.body': ctx.response.body
110109
? JSON.stringify(deepFilterData(ctx.response.body, true))

src/middleware/logger-middleware.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,19 @@ export default async function loggerMiddleware(ctx: Context, next: Next) {
1010
console.info(`--> ${ctx.method} ${ctx.path}`)
1111

1212
ctx.res.on('finish', () => {
13+
const status = ctx.status
1314
const endTime = Date.now()
1415
const timeMs = endTime - startTime
1516

1617
setTraceAttributes({
1718
'clay.matched_route': ctx.state.matchedRoute,
1819
'clay.matched_key': ctx.state.matchedServiceKey,
1920
'clay.forward_handler': ctx.state.forwardHandler?.handler,
21+
'http.status': status,
2022
'http.time_taken_ms': timeMs
2123
})
2224

23-
console.info(`<-- ${ctx.method} ${ctx.path} ${ctx.status}`)
25+
console.info(`<-- ${ctx.method} ${ctx.path} ${status}`)
2426
})
2527

2628
await next()

0 commit comments

Comments
 (0)