Skip to content

Conversation

@alowde
Copy link

@alowde alowde commented Nov 13, 2025

Pull Request Template

Description

Add new metrics for http requests to track performance of different origins (for example; different load balancers fronting the same app servers).

Adds:

  • Ratio of 4xx responses to total requests
  • Ratio of 5xx responses to total requests
  • p50, p95, and p99 quantiles of EdgeTimeToFirstByte

These metrics use the AdaptiveHTTPGroup endpoint to get statistically significant sampled values and return values for a five-minute rolling period to avoid spikes caused by outliers that settle as all samples are aggregated in the Cloudflare metric pipeline.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Other (please describe):

Testing

  • I have run make pr-tests and all tests pass
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Code Quality

  • My code follows the style guidelines of this project
  • [ x I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Before Submitting

Please ensure you have completed the following before submitting your PR:

# Run comprehensive tests
make pr-tests

If the above command fails, please fix the issues before submitting your PR.

Additional Notes

Add any other context about the pull request here.

@exokernel
Copy link

@alowde - Code looks good to me. I'm not sure about the graphql issue the Sentry bot is pointing out though. Do you have any insight on that?

@exokernel
Copy link

exokernel commented Nov 14, 2025

@alowde - Also have you tried running this code in integration to check that there are no issues in a real environment https://launchbay.bigcommerce.net/projects/439/releases/integration

To do that I think you will need to make a change on branch to fpm-cookery recipe here: https://github.com/bigcommerce/fpm-cookery/blob/master/cloudflare-exporter/recipe.rb to get a package on the apt repo in the lower envs

Then update the container repo here https://github.com/bigcommerce/cloudflare-exporter/blob/main/config/install.sh to use that package

And then you can do the deploy to integration linked above.

Yeah this process sucks. We have a ticket to revamp this repo to move deployments to the standard container deployment strategy but so far it hasn't been prioritized. ☹️

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