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: track cached response times #1232

Merged
merged 4 commits into from
Feb 8, 2022

Conversation

vasco-santos
Copy link
Contributor

This PR adds:

  • track cached response times
  • histogram summary response times

@cloudflare-workers-and-pages
Copy link

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

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8884012
Status: ✅  Deploy successful!
Preview URL: https://85044de8.nft-storage-1at.pages.dev

View logs

@vasco-santos vasco-santos force-pushed the feat/track-cached-response-times branch 2 times, most recently from 5739e8d to 8c0f3f9 Compare February 3, 2022 17:14
/** @type {ContentLengthStats} */
data = await request.json()
await this._updateWinnerMetrics(data)
await this._updatedCacheMetrics(data)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱

@vasco-santos vasco-santos requested a review from alanshaw February 3, 2022 17:20
return env.ipfsGateways
.map(
(gw) =>
`nftgateway_requests_per_time_total{gateway="${gw}",le="${t}",env="${env.ENV}"} ${metricsCollected.ipfsGateways[gw].responseTimeHistogram[t]}`
`nftgateway_requests_per_time_total{gateway="${gw}",le="${msToS(
Copy link
Contributor Author

@vasco-santos vasco-santos Feb 3, 2022

Choose a reason for hiding this comment

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

also made the le with seconds as we use seconds everywhere per Prometheus best practises

@vasco-santos vasco-santos force-pushed the feat/track-cached-response-times branch from 7b0c194 to f5f2c76 Compare February 6, 2022 08:49
@vasco-santos vasco-santos force-pushed the feat/track-cached-response-times branch from f5f2c76 to 1fbca4f Compare February 6, 2022 10:41
@vasco-santos vasco-santos merged commit d4f5951 into main Feb 8, 2022
@vasco-santos vasco-santos deleted the feat/track-cached-response-times branch February 8, 2022 11:54
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