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 #16

Closed
wants to merge 1 commit into from

Conversation

vasco-santos
Copy link
Contributor

As part of #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

Moved from nftstorage/nft.storage#1442

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 04e8a55
Status: ✅  Deploy successful!
Preview URL: https://570b8d98.nftstorage-link.pages.dev

View logs

Copy link

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

I think this would be more useful if we recorded the IPLD codec of the resolved CID of the content that gets served (the etag in the response). It is not always the CID in the subdomain/path i.e. when the request is for CID and path.

@vasco-santos
Copy link
Contributor Author

Closing this as this should be done in Loki queries

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.

2 participants