-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add network context to logs (#163)
* feat: add network context to logs This commit adds an optional context object to MetricsLogger which can be used to add network id and network name to all logs. This may help alerting services differentiate and bucket errors by network Example log after this change ``` {"name":"Uniswap Smart Order Router", "hostname":"toda-XPS-15-9510", "pid":157780, "chainId":1, "networkName":"mainnet", "level":30, "key":"FindBestSwapRoute", "value":13, "unit":"Milliseconds", "msg":"[Metric]: FindBestSwapRoute: 13 | Milliseconds", "time":"2022-08-17T19:40:45.340Z", "v":0} ``` * fix: remove lint changes
- Loading branch information
Showing
2 changed files
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters