Skip to content

Conversation

@lohanidamodar
Copy link
Member

@lohanidamodar lohanidamodar commented Jan 27, 2025

What does this PR do?

  • Setup logs db for storing logs and initialize it
  • Add a CLI loop container to loop through projects to queue for usage count
  • Update existing Usage queue and worker to support new type of payload
  • Use the new payload to product usage count logs and store it in new logs DB
  • Update usage dump worker to write stats to both project DB and logs DB
  • Remove database listeners used to count resources as it will override new logs DB
  • renames _APP_USAGE_AGGREGATION_INTERVAL to _APP_STATS_AGGREGATION_INTERVAL
  • Adds _APP_STATS_USAGE_DUAL_WRITING_DBS to temporarily disable or gradually start dual writing based on project DBs
  • renames health endpoint /queue/usage to /queue/stats-usage and /queue/usage-dump to /queue/stats-usage-dump
  • Adds new health endpoint v1/health/queue/stats-resources

Test Plan

  • Existing tests

Related PRs and Issues

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@github-actions
Copy link

github-actions bot commented Jan 27, 2025

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
pyc 3.12.7-r0 CVE-2024-12254 HIGH
python3 3.12.7-r0 CVE-2024-12254 HIGH
python3-pyc 3.12.7-r0 CVE-2024-12254 HIGH
python3-pycache-pyc0 3.12.7-r0 CVE-2024-12254 HIGH
rsync 3.3.0-r0 CVE-2024-12084 CRITICAL
rsync 3.3.0-r0 CVE-2024-12085 HIGH
golang.org/x/crypto v0.26.0 CVE-2024-45337 CRITICAL
golang.org/x/net v0.28.0 CVE-2024-45338 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@github-actions
Copy link

github-actions bot commented Jan 27, 2025

✨ Benchmark results

  • Requests per second: 1,021
  • Requests with 200 status code: 183,892
  • P99 latency: 0.178115398

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,021 1,637
200 183,892 294,640
P99 0.178115398 0.070899543

Copy link
Contributor

@christyjacob4 christyjacob4 left a comment

Choose a reason for hiding this comment

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

Approved, just some minor comments

@christyjacob4 christyjacob4 merged commit 2f95b0e into 1.6.x Feb 10, 2025
63 checks passed
@christyjacob4 christyjacob4 deleted the feat-logs-db branch February 10, 2025 18:20
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.

4 participants