fluxninja / aperture

Rate limiting, caching, and request prioritization for modern workloads
https://docs.fluxninja.com
Apache License 2.0
622 stars 24 forks source link

Fix default check response status #3081

Closed tanveergill closed 8 months ago

tanveergill commented 8 months ago

Description of change

Checklist

Summary by CodeRabbit

coderabbitai[bot] commented 8 months ago

Walkthrough

The changes involve logging and request handling enhancements in an observability collector and a flow control engine. A log level was modified to Autosample for empty request IDs, and the flow control engine now includes a default status code for denied responses, with the code being set if not provided explicitly.

Changes

File Path Change Summary
.../metricsprocessor/processor.go Updated log level to Autosample for empty request ID warning.
.../policies/flowcontrol/engine.go Added defaultDeniedResponseStatusCode to LimiterType; updated ProcessRequest to handle new default status code.

🐇✨ In the burrow of code, changes are afoot, Logs whisper softly, as flows take a new route. With every hop forward, a status code set, A rabbit's work done, with no regret. 🌟 🐇💻


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - You can directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit-tests for this file.` - You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging `@coderabbitai` in a comment. Examples: - `@coderabbitai generate unit tests for this file` - `@coderabbitai modularize this function` - You can tag `@coderabbitai` in a PR comment and ask questions about the PR and the codebase. Examples: - `@coderabbitai gather interesting statistics about this repository and render them in a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai generate unit tests for the src/utils.ts file.` ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json` ### CodeRabbit Discord Community Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.