Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Datadog PoC [OTE-702] [2/n] #932

Merged
merged 16 commits into from
Sep 16, 2024
Merged

Conversation

yogurtandjam
Copy link
Contributor

@yogurtandjam yogurtandjam commented Aug 19, 2024

Adds initial events described by the tech spec

  • DepositSubmit
  • WithdrawalSubmit
  • DepositRouteErrors
  • WithdrawalRouteErrors
  • withdrawToNobleIBC
  • cctpWithdraw
  • cctpMultiMsgWithdraw
  • sendNobleIBC

Also adds ddInfo and ddError methods to abacus logger implementation so we can pick them up in abacus and use them at will.

Finally, this PR adds dd.error to the log method, so any telemetry logs will automatically be piped into datadog

Copy link

linear bot commented Aug 19, 2024

Copy link

vercel bot commented Aug 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
v4-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 16, 2024 5:58pm
v4-testnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 16, 2024 5:58pm

@@ -19,6 +21,20 @@ class AbacusLogger implements Omit<AbacusLoggingProtocol, '__doNotUseOrImplement
console.error(`${tag}: ${message}`);
}
}

ddInfo(message: string, context: object) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dydxprotocol/frontend this is how im planning on giving abacus the power to log info and error msgs to datadog.
it's a little hacky but until we're ready to merge their logs i figure this is good enough.

@yogurtandjam yogurtandjam changed the title [WIP] Datadog PoC initial events [OTE-702] [2/n] Datadog PoC initial events [OTE-702] [2/n] Aug 19, 2024
@yogurtandjam yogurtandjam marked this pull request as ready for review August 19, 2024 21:00
@yogurtandjam yogurtandjam requested a review from a team as a code owner August 19, 2024 21:00
@yogurtandjam yogurtandjam changed the title Datadog PoC initial events [OTE-702] [2/n] chore: Datadog PoC initial events [OTE-702] [2/n] Aug 19, 2024
@yogurtandjam yogurtandjam changed the title chore: Datadog PoC initial events [OTE-702] [2/n] chore: Datadog PoC [OTE-702] [2/n] Aug 19, 2024
@@ -22,7 +22,7 @@ export const identify = (property: AnalyticsUserProperty) => {
detail: { property: propertyTypeToLog, propertyValue: property.payload },
});
dd.setContextProperty(propertyTypeToLog, property.payload);
dd.log(`set context item: ${propertyTypeToLog}`, dd.getContext());
dd.info(`set context item: ${propertyTypeToLog}`, dd.getContext());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to just add dd.info to track? or was it decided that is too much events

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was discussed in slack but we decided to be very conservative about the # of events we send and track the volume first

add dd file

revert usecompliancestate hook

fix import names

fix last broken import filepath

add events to deposit and withdraw forms

fix import names

dydx chain transactions logs. add abacus logger implementation. auto log errors

finish logger implementation

add service name and env

fix logging

fix type

typo
dd.info(message, parsedContext);
// catch in case parsing context fails for some reason
} catch (err) {
dd.error('Error sending dd info', undefined, err);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe send the context string in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah good point, forgot the error won't have that data. i like it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants