wormhole-explorer/parser
agodnic d9d49ec919
Add 24h volume to scorecards (#274)
### Summary

This pull request adds volume metrics to influxdb. Also, it adds the 24h volume metric to `GET /api/v1/scorecards`.

Tracking issues: https://github.com/wormhole-foundation/wormhole-explorer/issues/221, https://github.com/wormhole-foundation/wormhole-explorer/issues/280

### Changes:
* The `parser` service no longer generates metrics for influxdb. All metrics-related code was removed from that service, that code was moved to the analytics service instead.
* New volume metrics were added to the analytics service.
* The notional cache was modified to use token names (i.e.: ticker symbols) as keys instead of chain IDs.
* The notional cache reader was moved to the `common/client/cache` package.
* A little bit of duplicated code between the cache reader and writer was removed.
* A 24h volume metric was added to `GET /api/v1/scorecards`.
* A dictionary that stores token metadata was added under `common/domain/tokenbridge.go`. More tokens will be added to it in the near future.
2023-05-04 20:17:03 -03:00
..
cmd Add 24h volume to scorecards (#274) 2023-05-04 20:17:03 -03:00
config [API/PARSER] Chain activity and last transaction endpoints (#175) 2023-03-07 16:25:42 -03:00
consumer [API/PARSER] Chain activity and last transaction endpoints (#175) 2023-03-07 16:25:42 -03:00
http/infrastructure Improve logs for health/ready endpoints (#133) 2023-02-03 15:58:58 -03:00
internal Feature/refactor parser to use sns sqs (#148) 2023-02-16 10:55:54 -03:00
parser [API/PARSER] Chain activity and last transaction endpoints (#175) 2023-03-07 16:25:42 -03:00
processor Add 24h volume to scorecards (#274) 2023-05-04 20:17:03 -03:00
queue Feature/refactor parser to use sns sqs (#148) 2023-02-16 10:55:54 -03:00
.env.example Feature/add parser pipeline (#46) 2023-01-18 12:42:14 -03:00
.gitignore [PARSER/PIPELINE] Update .gitignore (#174) 2023-03-06 14:35:53 -03:00
Dockerfile [API/PARSER] Chain activity and last transaction endpoints (#175) 2023-03-07 16:25:42 -03:00
Makefile [PARSER/PIPELINE] Update .gitignore (#174) 2023-03-06 14:35:53 -03:00
README.md Feature/refactor parser to use sns sqs (#148) 2023-02-16 10:55:54 -03:00
go.mod logging as json (#208) 2023-03-23 15:36:50 -03:00
go.sum logging as json (#208) 2023-03-23 15:36:50 -03:00

README.md

Parser

Config sns topic

aws --profile localstack --endpoint-url=http://localhost:4566 sns create-topic --name vaas-pipeline.fifo --attributes FifoTopic=true,ContentBasedDeduplication=false

Config SQS FIFO with dead letter queue localstack

aws --profile localstack --endpoint-url=http://localhost:4566 sqs create-queue --queue-name=wormhole-vaa-parser-dlq-queue.fifo --attributes "FifoQueue=true"

aws --profile localstack --endpoint-url=http://localhost:4566 sqs create-queue --queue-name=wormhole-vaa-parser-queue.fifo --attributes FifoQueue=true,MessageRetentionPeriod=3600,ReceiveMessageWaitTimeSeconds=5,VisibilityTimeout=20,RedrivePolicy=""{\"deadLetterTargetArn\":\"arn:aws:sqs:us-east-1:000000000000:wormhole-vaa-parser-dlq-queue.fifo\",\"maxReceiveCount\":\"2\"}""

Subscribe SQS FIFO to vaas-pipeline.fifo topic

aws --profile localstack --endpoint-url=http://localhost:4566 sns subscribe --topic-arn arn:aws:sns:us-east-1:000000000000:vaas-pipeline.fifo --protocol sqs --notification-endpoint http://localhost:4566/000000000000/wormhole-vaa-parser-queue.fifo

Check message in the dead letter queue localstack

aws --profile localstack --endpoint-url=http://localhost:4566 sqs receive-message --queue-url=http://localhost:4566/000000000000/wormhole-vaa-parser-dlq-queue.fifo