Skip to content

chore: use @rocket.chat/logger in presence service - #41034

Merged
dionisio-bot[bot] merged 1 commit into
developfrom
chore/presence-logger-migration
Jun 25, 2026
Merged

chore: use @rocket.chat/logger in presence service#41034
dionisio-bot[bot] merged 1 commit into
developfrom
chore/presence-logger-migration

Conversation

@ricardogarim

@ricardogarim ricardogarim commented Jun 21, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Replace the raw console.* calls in @rocket.chat/presence (Presence.ts, PresenceReaper.ts) with structured @rocket.chat/logger instances.

Issue(s)

Steps to test or reproduce

Further comments

Logging-only migration, no behavior change. No Dockerfile edit needed — @rocket.chat/logger is already a dependency of presence-service and copied into its build.

Summary by CodeRabbit

  • Chores
    • Improved logging infrastructure in the presence service by integrating a dedicated logger instead of standard console outputs.

@ricardogarim ricardogarim added this to the 8.7.0 milestone Jun 21, 2026
@dionisio-bot

dionisio-bot Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 21, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f5d82b1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 28866190-1979-4e49-b638-864930670b45

📥 Commits

Reviewing files that changed from the base of the PR and between b94ee10 and f5d82b1.

📒 Files selected for processing (3)
  • ee/packages/presence/package.json
  • ee/packages/presence/src/Presence.ts
  • ee/packages/presence/src/lib/PresenceReaper.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • ee/packages/presence/package.json
  • ee/packages/presence/src/lib/PresenceReaper.ts
  • ee/packages/presence/src/Presence.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check

Walkthrough

The @rocket.chat/presence package adds @rocket.chat/logger as a workspace dependency. Both Presence.ts and PresenceReaper.ts replace all console.error/console.debug calls with a module-level structured Logger instance, emitting structured payloads with count and reasons fields.

Changes

Presence Logger Migration

Layer / File(s) Summary
Add @rocket.chat/logger workspace dependency
ee/packages/presence/package.json
Adds @rocket.chat/logger as a workspace-versioned entry in the dependencies block.
Logger migration in Presence.ts and PresenceReaper.ts
ee/packages/presence/src/Presence.ts, ee/packages/presence/src/lib/PresenceReaper.ts
Imports Logger and initializes a module-level logger instance in both files; replaces console.error with logger.error (structured payload) in the expiration job catch, handleReaperUpdates rejected branch, and PresenceReaper interval callback; replaces console.debug with logger.debug for fulfilled updates in handleReaperUpdates.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing console logging with @rocket.chat/logger throughout the presence service.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • PRES-33: Request failed with status code 401

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.

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.10%. Comparing base (02b8008) to head (f5d82b1).
⚠️ Report is 45 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41034      +/-   ##
===========================================
- Coverage    70.12%   70.10%   -0.02%     
===========================================
  Files         3357     3360       +3     
  Lines       129552   129673     +121     
  Branches     22407    22507     +100     
===========================================
+ Hits         90843    90912      +69     
- Misses       35416    35448      +32     
- Partials      3293     3313      +20     
Flag Coverage Δ
e2e 59.30% <ø> (+0.02%) ⬆️
e2e-api 46.37% <ø> (+0.15%) ⬆️
unit 70.03% <80.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ricardogarim
ricardogarim marked this pull request as ready for review June 22, 2026 12:09

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 4 files

Re-trigger cubic

Comment thread .changeset/shaky-dogs-mate.md Outdated
@ricardogarim
ricardogarim force-pushed the chore/presence-logger-migration branch from b94ee10 to f5d82b1 Compare June 22, 2026 14:46
@ricardogarim ricardogarim added the stat: QA assured Means it has been tested and approved by a company insider label Jun 22, 2026
@ricardogarim ricardogarim modified the milestones: 8.7.0, 8.6.0 Jun 22, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 22, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jun 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 22, 2026
@ricardogarim ricardogarim removed this from the 8.6.0 milestone Jun 22, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label Jun 22, 2026
@ricardogarim ricardogarim added this to the 8.6.0 milestone Jun 22, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 22, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jun 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 22, 2026
@ricardogarim ricardogarim removed this from the 8.6.0 milestone Jun 23, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label Jun 23, 2026
@ricardogarim ricardogarim modified the milestone: 8.7.0 Jun 23, 2026
@ricardogarim ricardogarim removed the stat: QA assured Means it has been tested and approved by a company insider label Jun 24, 2026
@ricardogarim ricardogarim added this to the 8.7.0 milestone Jun 24, 2026
@ricardogarim ricardogarim added the stat: QA assured Means it has been tested and approved by a company insider label Jun 24, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jun 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 24, 2026
@ricardogarim ricardogarim modified the milestone: 8.7.0 Jun 25, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 25, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jun 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 25, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jun 25, 2026
Merged via the queue into develop with commit 660215a Jun 25, 2026
47 checks passed
@dionisio-bot
dionisio-bot Bot deleted the chore/presence-logger-migration branch June 25, 2026 14:45
d-gubert added a commit that referenced this pull request Jun 25, 2026
commit b1e5eba
Author: Douglas Gubert <douglas.gubert@gmail.com>
Date:   Thu Jun 25 13:07:19 2026 -0300

    test(apps): clean deno-runtime temp link before running

commit c39875e
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date:   Fri Jun 5 17:57:10 2026 +0000

    test(apps): preserve _id and support _id partial updates in test storage

commit 114e5e7
Author: Douglas Gubert <douglas.gubert@gmail.com>
Date:   Wed Jun 3 16:37:07 2026 -0300

    chore: add @RocketChat/apps as codeowner of more paths

commit 28a45be
Author: Douglas Gubert <douglas.gubert@gmail.com>
Date:   Wed Jun 3 15:54:13 2026 -0300

    chore(apps): loosen permissions for deno test

commit 1895ed4
Author: Douglas Gubert <douglas.gubert@gmail.com>
Date:   Wed Jun 3 15:46:33 2026 -0300

    chore(apps): replace nedb in tests for custom mock

    fix mock

commit 660215a
Author: Ricardo Garim <rswarovsky@gmail.com>
Date:   Thu Jun 25 11:06:59 2026 -0300

    chore: use @rocket.chat/logger in presence service (#41034)
d-gubert added a commit that referenced this pull request Jun 25, 2026
commit b1e5eba
Author: Douglas Gubert <douglas.gubert@gmail.com>
Date:   Thu Jun 25 13:07:19 2026 -0300

    test(apps): clean deno-runtime temp link before running

commit c39875e
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date:   Fri Jun 5 17:57:10 2026 +0000

    test(apps): preserve _id and support _id partial updates in test storage

commit 114e5e7
Author: Douglas Gubert <douglas.gubert@gmail.com>
Date:   Wed Jun 3 16:37:07 2026 -0300

    chore: add @RocketChat/apps as codeowner of more paths

commit 28a45be
Author: Douglas Gubert <douglas.gubert@gmail.com>
Date:   Wed Jun 3 15:54:13 2026 -0300

    chore(apps): loosen permissions for deno test

commit 1895ed4
Author: Douglas Gubert <douglas.gubert@gmail.com>
Date:   Wed Jun 3 15:46:33 2026 -0300

    chore(apps): replace nedb in tests for custom mock

    fix mock

commit 660215a
Author: Ricardo Garim <rswarovsky@gmail.com>
Date:   Thu Jun 25 11:06:59 2026 -0300

    chore: use @rocket.chat/logger in presence service (#41034)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants