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

Use GraphQL rather than REST for indexer-metrics #386

Merged
merged 1 commit into from
May 28, 2024
Merged

Conversation

banool
Copy link
Collaborator

@banool banool commented May 23, 2024

Summary

API Gateway doesn't proxy the REST endpoints for Hasura. We spoke a while ago and decided we'd just not use them. This PR makes that the case.

Test Plan

$ cat /tmp/config.yaml
health_check_port: 8080
server_config:
  chain_name: testnet
  hasura_graphql_endpoint: https://api.testnet.aptoslabs.com/v1/graphql
  fullnode_rest_api_endpoint: https://api.testnet.aptoslabs.com/v1
cargo run -p indexer-metrics -- -c config.yaml

Output: https://gist.github.com/banool/c9ead808cba82ece5689a26fa6abd7cf.

See the internal-ops half of this: https://github.com/aptos-labs/internal-ops/pull/3265.

@banool banool force-pushed the banool/no-rest-hasura branch 3 times, most recently from 04738e5 to 2069bba Compare May 23, 2024 13:21
@bowenyang007
Copy link
Collaborator

Can we deploy this to dev/testnet and validate that the metrics still work as part of test plan?

@banool
Copy link
Collaborator Author

banool commented May 28, 2024

Done, see https://github.com/aptos-labs/internal-ops/pull/3265. There is some difference with indexer_metrics_hasura_latest_transaction_latency_secs, see there for more.

@banool banool force-pushed the banool/no-rest-hasura branch from 2069bba to c21a8c4 Compare May 28, 2024 15:08
@banool banool merged commit 3f574b5 into main May 28, 2024
7 checks passed
@banool banool deleted the banool/no-rest-hasura branch May 28, 2024 20:08
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