8000 fix: use individual span attributes for country codes by ChiragAgg5k · Pull Request #11238 · appwrite/appwrite · GitHub
[go: up one dir, main page]

Skip to content

fix: use individual span attributes for country codes#11238

Merged
abnegate merged 2 commits into1.8.xfrom
fix-span-country-codes-logql
Feb 4, 2026
Merged

fix: use individual span attributes for country codes#11238
abnegate merged 2 commits into1.8.xfrom
fix-span-country-codes-logql

Conversation

@ChiragAgg5k
Copy link
Member

Summary

  • Replace stringified JSON countryCodes span attribute with individual countryCode_{code} attributes
  • Improves LogQL query compatibility for monitoring systems
  • Enables direct filtering like {countryCode_1 > 0} instead of parsing JSON

Test plan

  • Verify SMS messages add individual country code span attributes
  • Test LogQL queries can filter by specific country codes

Replace stringified JSON countryCodes attribute with individual
countryCode_{code} attributes to improve LogQL query compatibility.
@ChiragAgg5k ChiragAgg5k changed the base branch from main to 1.8.x February 4, 2026 04:46
@coderabbitai
Copy link
Contributor
coderabbitai bot commented Feb 4, 2026
📝 Walkthrough

Walkthrough

The Messaging.php worker is being modified to change how country code metrics are recorded. Previously, both sendExternalMessage and sendInternalSMSMessage functions recorded a single aggregated Span metric containing a JSON-encoded map of all country codes and their counts. The new implementation replaces this with individual Span metrics for each country code, using the naming pattern countryCode_<code> with the corresponding count value.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 clearly describes the main change: replacing aggregated country code metrics with individual span attributes for improved monitoring compatibility.
Description check ✅ Passed The description is directly related to the changeset, explaining the motivation (LogQL compatibility), implementation (individual span attributes), and testing approach.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-span-country-codes-logql

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.

@pkg-pr-new
Copy link
pkg-pr-new bot commented Feb 4, 2026

Open in StackBlitz

npm i https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@11238

commit: 345d8f2

@github-actions
Copy link
github-actions bot commented Feb 4, 2026

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
libcrypto3 3.5.4-r0 CVE-2025-15467 CRITICAL
libcrypto3 3.5.4-r0 CVE-2025-69419 HIGH
libcrypto3 3.5.4-r0 CVE-2025-69421 HIGH
libpng 1.6.51-r0 CVE-2025-66293 HIGH
libpng 1.6.51-r0 CVE-2026-22695 HIGH
libpng 1.6.51-r0 CVE-2026-22801 HIGH
libpng-dev 1.6.51-r0 CVE-2025-66293 HIGH
libpng-dev 1.6.51-r0 CVE-2026-22695 HIGH
libpng-dev 1.6.51-r0 CVE-2026-22801 HIGH
libssl3 3.5.4-r0 CVE-2025-15467 CRITICAL
libssl3 3.5.4-r0 CVE-2025-69419 HIGH
libssl3 3.5.4-r0 CVE-2025-69421 HIGH
libxml2 2.13.8-r0 CVE-2025-49794 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49796 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49795 HIGH
libxml2 2.13.8-r0 CVE-2025-6021 HIGH
openssl 3.5.4-r0 CVE-2025-15467 CRITICAL
openssl 3.5.4-r0 CVE-2025-69419 HIGH
openssl 3.5.4-r0 CVE-2025-69421 HIGH
openssl-dev 3.5.4-r0 CVE-2025-15467 CRITICAL
openssl-dev 3.5.4-r0 CVE-2025-69419 HIGH
openssl-dev 3.5.4-r0 CVE-2025-69421 HIGH
py3-urllib3 1.26.20-r0 CVE-2026-21441 HIGH
py3-urllib3-pyc 1.26.20-r0 CVE-2026-21441 HIGH
github.com/containerd/containerd/v2 v2.0.2 CVE-2024-25621 HIGH
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH
stdlib 1.22.10 CVE-2025-47907 HIGH
stdlib 1.22.10 CVE-2025-58183 HIGH
stdlib 1.22.10 CVE-2025-61726 HIGH
stdlib 1.22.10 CVE-2025-61728 HIGH
stdlib 1.22.10 CVE-2025-61729 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@github-actions
Copy link
github-actions bot commented Feb 4, 2026

✨ Benchmark results

  • Requests per second: 2,465
  • Requests with 200 status code: 443,737
  • P99 latency: 0.063260159

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 2,465 1,219
200 443,737 219,507
P99 0.063260159 0.16652302

@abnegate abnegate merged commit 17fc91a into 1.8.x Feb 4, 2026
71 of 72 checks passed
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