Skip to content

Commit

Permalink
[argus] include response headers in http log
Browse files Browse the repository at this point in the history
  • Loading branch information
kdembler committed Oct 10, 2023
1 parent df3ed68 commit bce9585
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions distributor-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Add 1s delay between fetching pages for QN state sync. This will allow QN to have some breathing space and process other requests that may have been stuck because of heavy processing.
- Add `Access-Control-Expose-Headers` response header to allow web clients checking cache status of downloaded file.
- Include response headers in `http` logs

### 1.3.1

Expand Down
5 changes: 4 additions & 1 deletion distributor-node/src/services/httpApi/HttpApiBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ export abstract class HttpApiBase {
winstonInstance: this.logger,
level: 'http',
dynamicMeta: (req, res) => {
return { prematurelyClosed: res.locals.prematurelyClosed ?? false }
return {
prematurelyClosed: res.locals.prematurelyClosed ?? false,
res: { headers: res.getHeaders(), statusCode: res.statusCode },
}
},
}
}
Expand Down

0 comments on commit bce9585

Please sign in to comment.