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

368 improve exported metrics for usage in grafana dashboards #468

Merged

Conversation

gianfra-t
Copy link
Contributor

A display label is added of the form {collateral}_{wrapped}

Where both collateral and wrapped are formatted for display the following way:

XCM = "XCM(value)",
StellarNative = "XLM"
Native = "Native"
Stellar::AlphaNum4 {code, ..} | AlphaNum12 {code, ..} = "code"
CurrencyId::ZenlinkLPToken(token1_id, token1_type, token2_id, token2_type) = "LP_{}_{}_{}_{}", token1_id, token1_type, token2_id, token2_type)

Also appends status or type of the corresponding metric so that display name is formatted as

"{collateral}_{wrapped} - {status/type}"

@gianfra-t gianfra-t linked an issue Dec 20, 2023 that may be closed by this pull request
@gianfra-t gianfra-t requested a review from ebma December 20, 2023 20:51
Copy link
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

Looks good 👍 the formatting/indentation is off though. Please run rustfmt and consider running this script to install a pre-commit hook for Spacewalk that runs rustfmt on each commit.

Ready to merge once formatting is fixed and CI passed

@gianfra-t
Copy link
Contributor Author

Yes! it happens to me quite often that very simple clippy and format changes are off. I will install the pre-commit hook.

@gianfra-t
Copy link
Contributor Author

gianfra-t commented Dec 21, 2023

@ebma any idea why the tests might be failing? When looking at the errors,op_no_destination and op_no_destination it seems to me like the Stellar test accounts might have an issue.

@ebma
Copy link
Member

ebma commented Dec 21, 2023

Right, I think it was related to the Stellar testnet reset but I set up the accounts again and it restarted the CI job so let's see.

@ebma
Copy link
Member

ebma commented Dec 22, 2023

I had another look and we need #470 to fix the tests. Once that PR is merged we can rebase this one and it should be fixed 🤞

@gianfra-t gianfra-t merged commit 816aa00 into main Jan 3, 2024
2 checks passed
@gianfra-t gianfra-t deleted the 368-improve-exported-metrics-for-usage-in-grafana-dashboards branch January 3, 2024 13:59
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.

Improve exported metrics for usage in Grafana dashboards
2 participants