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

feat: add datadog script, update claim event fields and subscriber #258

Merged
merged 19 commits into from
Nov 14, 2023

Conversation

swimricky
Copy link
Contributor

@swimricky swimricky commented Nov 10, 2023

Summary

  • Added ecosystem & address to ClaimEvent
  • added datadog script

Copy link

vercel bot commented Nov 10, 2023

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

Name Status Preview Comments Updated (UTC)
grant-program ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2023 5:03pm
grant-program-devnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2023 5:03pm

@@ -174,6 +174,8 @@ pub mod token_dispenser {
claim_amount: claim_info.amount,
claimant: *ctx.accounts.claimant.key,
leaf_buffer: leaf_vector,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@guibescos do you think the leaf_buffer is still needed?

Choose a reason for hiding this comment

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

won't it be useful to check double spends?

@swimricky swimricky marked this pull request as ready for review November 13, 2023 16:41
* DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" ts-node ./scripts/datadog.ts
*/

import { client, v1 } from '@datadog/datadog-api-client'
Copy link
Contributor

@guibescos guibescos Nov 13, 2023

Choose a reason for hiding this comment

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

mmmm I thought we where just gonna log instead of sending to datadog

Choose a reason for hiding this comment

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

Yeah while events are nice I think they can slow us down. I think we can iterate faster with logs and then we can worry about parsing them and alerts later.


const errorTxnSigChunks = chunkArray(errorTxnSigs, this.chunkSize)

const errorTxns = (await this.fetchTxns(errorTxnSigChunks)).map((txn) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it useful to fetch the transactions with errors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these would be failed txns. if we see a large influx of failed txns someone could be attempting to exploit something or there may be some other issue

Copy link
Contributor

@guibescos guibescos left a comment

Choose a reason for hiding this comment

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

ty, gonna approve to unblock. Not sure about sending an event with each transactions, maybe you should look to aggregate information before sending events.

@swimricky swimricky merged commit 3cd7c11 into main Nov 14, 2023
6 checks passed
@swimricky swimricky deleted the event-datadog branch November 14, 2023 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants