8000 Remove superfluous logs from StatsResources worker by loks0n · Pull Request #11383 · appwrite/appwrite · GitHub
[go: up one dir, main page]

Skip to content

Remove superfluous logs from StatsResources worker#11383

Merged
loks0n merged 1 commit into1.8.xfrom
telemetry/better-stats-logging
Feb 23, 2026
Merged

Remove superfluous logs from StatsResources worker#11383
loks0n merged 1 commit into1.8.xfrom
telemetry/better-stats-logging

Conversation

@loks0n
Copy link
Member
@loks0n loks0n commented Feb 23, 2026

Summary

  • Removed redundant Console::info/Console::error/Console::success logs from the StatsResources worker — project ID, sequence, region, database, and duration are already captured by the telemetry span
  • Added Span::add('documents.count', ...) to capture the only detail not already in the span
  • Simplified error handling by letting exceptions propagate to existing logError callbacks

Test plan

  • Verify stats-resources worker processes projects without console log noise
  • Verify documents.count appears in telemetry span output
  • Verify exceptions still surface via logError callbacks

🤖 Generated with Claude Code

Replace redundant Console::info/error/success logs with Span::add
for document count — all other details (project ID, sequence, region,
database, duration) are already captured by the telemetry span.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@loks0n loks0n changed the base branch from main to 1.8.x February 23, 2026 11:42
@coderabbitai
Copy link
Contributor
coderabbitai bot commented Feb 23, 2026

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

This pull request introduces a comprehensive refactoring and feature expansion for Appwrite. The primary changes include a systematic migration from the App facade to the Http facade across routing, resource registration, and controller initialization. New capabilities are added, including organization and account-level API keys with corresponding scopes, PostgreSQL database adapter support, CORS configuration, and schedule event handling. Several API controller files (avatars, console, health, storage) are removed entirely, likely moved to modular implementations. Database schema is expanded with new collection attributes for platform deployment specifications and team labels. CI/CD workflows are updated with GitHub Actions version bumps and enhanced tracing/instrumentation. All shell wrapper scripts in the bin/ directory are standardized to use exec with proper argument quoting. Configuration files are extended with new environment variables for database selection, GraphQL introspection, and compression settings.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

The changes span heterogeneous categories—routing framework migration, configuration expansion, complete controller removals, database schema modifications, CI/CD updates, and bin script standardization—each requiring distinct reasoning. High logic density appears in resource registration, API controller consolidation, database initialization, and realtime/HTTP lifecycle management. The architectural shift from App to Http is pervasive and consequential, combined with significant schema and feature additions, necessitating thorough multi-area review.

Possibly related PRs

  • chore: upgrade utopia queue and replace App with Http #11239: Implements the same App→Http facade migration pattern across routing and resource registration, making it directly aligned with the core architectural refactoring in this PR.
  • fix: task subprocesses #11040: Updates bin/ wrapper scripts with identical exec and argument quoting changes, sharing the exact same standardization pattern.
  • 1.7.x #9649: Adds overlapping platform/sites/compute features, including new configuration attributes, environment variables, and collection schema changes present in this PR.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove superfluous logs from StatsResources worker' accurately describes the primary change: removing redundant Console logging from the StatsResources worker and replacing it with telemetry span instrumentation.
Description check ✅ Passed The description clearly explains the changes: removes redundant Console logs, adds Span instrumentation for documents.count, and simplifies error handling. It directly relates to the changeset and provides meaningful context about what was removed and what was added.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch telemetry/better-stats-logging

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
libecpg 18.1-r0 CVE-2026-2004 HIGH
libecpg 18.1-r0 CVE-2026-2005 HIGH
libecpg 18.1-r0 CVE-2026-2006 HIGH
libecpg 18.1-r0 CVE-2026-2007 HIGH
libecpg-dev 18.1-r0 CVE-2026-2004 HIGH
libecpg-dev 18.1-r0 CVE-2026-2005 HIGH
libecpg-dev 18.1-r0 CVE-2026-2006 HIGH
libecpg-dev 18.1-r0 CVE-2026-2007 HIGH
libpq 18.1-r0 CVE-2026-2004 HIGH
libpq 18.1-r0 CVE-2026-2005 HIGH
libpq 18.1-r0 CVE-2026-2006 HIGH
libpq 18.1-r0 CVE-2026-2007 HIGH
libpq-dev 18.1-r0 CVE-2026-2004 HIGH
libpq-dev 18.1-r0 CVE-2026-2005 HIGH
libpq-dev 18.1-r0 CVE-2026-2006 HIGH
libpq-dev 18.1-r0 CVE-2026-2007 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2004 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2005 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2006 HIGH
postgresql18-dev 18.1-r0 CVE-2026-2007 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@github-actions
Copy link

✨ Benchmark results

  • Requests per second: 1,966
  • Requests with 200 status code: 353,975
  • P99 latency: 0.079290911

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,966 1,108
200 353,975 199,535
P99 0.079290911 0.184248613

@loks0n loks0n merged commit 8c48c76 into 1.8.x Feb 23, 2026
110 of 113 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Mar 9, 2026
2 tasks
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

0