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: gateway tracking metrics ipld codec and multihash function #1442

Conversation

vasco-santos
Copy link
Contributor

@vasco-santos vasco-santos commented Feb 22, 2022

As part of nftstorage/nftstorage.link#18 this PR augments metrics with ipld codec and multihash function type counter. Prometheus metrics look as follows:

# HELP nftgateway_responses_by_ipld_codec_total total of responses by ipld codec.
# TYPE nftgateway_responses_by_ipld_codec_total counter
nftgateway_responses_by_ipld_codec_total{env="test",codec="raw"} 1
# HELP nftgateway_responses_by_multihash_function_total total of responses by multihash function.
# TYPE nftgateway_responses_by_multihash_function_total counter
nftgateway_responses_by_multihash_function_total{env="test",function="sha2-256"} 1

@@ -20,8 +20,10 @@
},
"dependencies": {
"itty-router": "^2.4.5",
"multicodec": "^3.2.1",
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 package is deprecated, but it seems to be the only way to get name for a codec...

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 22, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: cee7075
Status: ✅  Deploy successful!
Preview URL: https://39d343eb.nft-storage-1at.pages.dev

View logs

@vasco-santos vasco-santos force-pushed the feat/gateway-tracking-metrics-ipld-codec-and-multihash-function branch from cb3a952 to 7ea7445 Compare March 31, 2022 12:06
@vasco-santos vasco-santos force-pushed the feat/gateway-tracking-metrics-ipld-codec-and-multihash-function branch from 7ea7445 to cee7075 Compare March 31, 2022 12:07
@vasco-santos vasco-santos marked this pull request as ready for review March 31, 2022 12:11
@vasco-santos vasco-santos requested a review from alanshaw March 31, 2022 12:12
@vasco-santos vasco-santos deleted the feat/gateway-tracking-metrics-ipld-codec-and-multihash-function branch April 7, 2022 12:34
@vasco-santos vasco-santos restored the feat/gateway-tracking-metrics-ipld-codec-and-multihash-function branch April 7, 2022 12:36
@vasco-santos vasco-santos reopened this Apr 7, 2022
@vasco-santos
Copy link
Contributor Author

Closing in favour of nftstorage/nftstorage.link#16 given gateway code was moved

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.

1 participant