-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: sdex logger * fix: add logs to calcImpact * feat: update swap logger * fix: add service name to logger * fix: remove logs * fix: log calcImpact in ambient utils * fix: error logs * feat: add dataFormatted logs * rebuild * test: logger * fix: remove log * chore: add changeset --------- Co-authored-by: soulBit <[email protected]>
- Loading branch information
Showing
8 changed files
with
186 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"frontend": patch | ||
"@sovryn/sdex": patch | ||
"@sovryn/sdk": patch | ||
--- | ||
|
||
SOV-4239: add SDEX swap error logging for debugging |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ | |
"typescript": "^5.3.3" | ||
}, | ||
"dependencies": { | ||
"@datadog/browser-logs": "^5.21.0", | ||
"ethers": "^5.5.3" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
export * from "./constants"; | ||
export * from "./utils"; | ||
export * from "./abis"; | ||
export * from "./pool"; | ||
export * from "./position"; | ||
export * from "./swap"; | ||
export * from "./croc"; | ||
export * from './constants'; | ||
export * from './utils'; | ||
export * from './abis'; | ||
export * from './pool'; | ||
export * from './position'; | ||
export * from './swap'; | ||
export * from './croc'; | ||
export * from './logger'; | ||
|
||
export * from "./encoding/liquidity"; | ||
export * from './encoding/liquidity'; | ||
|
||
export * from "./recipes/reposition"; | ||
export * from './recipes/reposition'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { datadogLogs } from '@datadog/browser-logs'; | ||
|
||
datadogLogs.init({ | ||
clientToken: process.env.REACT_APP_DATADOG_CLIENT_TOKEN || '', | ||
site: 'datadoghq.com', | ||
forwardErrorsToLogs: true, | ||
sessionSampleRate: 100, | ||
service: 'd2', | ||
}); | ||
|
||
export const logger = (type: 'info' | 'error', title: string, data: object) => { | ||
if (type === 'error') { | ||
datadogLogs.logger.error(title, data); | ||
} else if (type === 'info') { | ||
datadogLogs.logger.info(title, data); | ||
} | ||
}; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1976,6 +1976,18 @@ | |
resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.0.2.tgz#1bfafe4b7ed0f3e4105837e056e0a89b108ebe36" | ||
integrity sha512-IkpVW/ehM1hWKln4fCA3NzJU8KwD+kIOvPZA4cqxoJHtE21CCzjyp+Kxbu0i5I4tBNOlXPL9mjwnWlL0VEG4Fg== | ||
|
||
"@datadog/[email protected]": | ||
version "5.21.0" | ||
resolved "https://registry.yarnpkg.com/@datadog/browser-core/-/browser-core-5.21.0.tgz#980e43d036a4c2074d37b887bd0ba748cca75e15" | ||
integrity sha512-F0lZCwHwGCryhyRAg9x9Aeq8FsYMxA41vwyBeyFHbh+er5UrQl/LuKdrRMSxz3kpaBdHppLP920voTSvooHiug== | ||
|
||
"@datadog/[email protected]", "@datadog/browser-logs@^5.21.0": | ||
version "5.21.0" | ||
resolved "https://registry.yarnpkg.com/@datadog/browser-logs/-/browser-logs-5.21.0.tgz#86afe2595a6bb5ddbc095500a2f35733b35e5aad" | ||
integrity sha512-Nb1F2M0tQzSnDU3iI61U+fnqPskuYMuYTyMLD9KwvcKru4cGj3+k5nYVmszvwEKZZ+etYff+1iBvnpYIo2w6hw== | ||
dependencies: | ||
"@datadog/browser-core" "5.21.0" | ||
|
||
"@design-systems/[email protected]": | ||
version "2.12.0" | ||
resolved "https://registry.yarnpkg.com/@design-systems/utils/-/utils-2.12.0.tgz#955c108be07cb8f01532207cbfea8f848fa760c9" | ||
|