Skip to content

chore: info to debug logs#3348

Merged
Kefancao merged 1 commit into
dydxprotocol:mainfrom
ben-dydx-ops:chore-info-to-debug-logs
Jun 16, 2026
Merged

chore: info to debug logs#3348
Kefancao merged 1 commit into
dydxprotocol:mainfrom
ben-dydx-ops:chore-info-to-debug-logs

Conversation

@ben-dydx-ops

@ben-dydx-ops ben-dydx-ops commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Changelist

Switch high-frequency logger.info calls to logger.debug to cut log noise across
ender, vulcan, socks, comlink, and roundtable — block/message processing, order
place/update/remove handlers, websocket connection lifecycle, request logging, and
PnL tick creation.

Note: these lines are only suppressed once the deployed LOG_LEVEL is info. The
default is debug, so the ECS task definitions for the affected services must set
LOG_LEVEL=info for this to take effect (see Deployment note).

Deployment note

Set LOG_LEVEL=info on the indexer task definitions for: ender, comlink, socks,
roundtable, vulcan
. Without this the change is a no-op (debug logs still emit).

Summary by CodeRabbit

  • Chores
    • Adjusted logging verbosity across indexer services to reduce standard log output while preserving detailed debug-level logging for troubleshooting purposes.

@ben-dydx-ops ben-dydx-ops requested a review from a team as a code owner June 15, 2026 14:47
@coderabbitai

coderabbitai Bot commented Jun 15, 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 57b87f56-86e0-454e-86ff-2520fafd2fbf

📥 Commits

Reviewing files that changed from the base of the PR and between 5ee9766 and 973d715.

📒 Files selected for processing (12)
  • indexer/services/comlink/src/request-helpers/request-logger.ts
  • indexer/services/ender/src/caches/block-cache.ts
  • indexer/services/ender/src/caches/orderbook-mid-price-memory-cache.ts
  • indexer/services/ender/src/lib/block-processor.ts
  • indexer/services/ender/src/lib/on-message.ts
  • indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts
  • indexer/services/socks/src/lib/message-forwarder.ts
  • indexer/services/socks/src/lib/subscription.ts
  • indexer/services/socks/src/websocket/index.ts
  • indexer/services/vulcan/src/handlers/order-place-handler.ts
  • indexer/services/vulcan/src/handlers/order-remove-handler.ts
  • indexer/services/vulcan/src/handlers/order-update-handler.ts

📝 Walkthrough

Walkthrough

Thirty-three logger.info calls are downgraded to logger.debug across five indexer services: comlink (request logger), ender (block cache, orderbook cache, block processor, on-message), roundtable (pnl-ticks helper), socks (websocket lifecycle, message forwarder, subscriptions), and vulcan (order place/remove/update handlers). One additional change in subscription.ts gates the "max subscriptions by channel" log behind a non-empty object check.

Changes

Log Level Downgrade Across Indexer Services

Layer / File(s) Summary
Ender service log level changes
indexer/services/ender/src/caches/block-cache.ts, indexer/services/ender/src/caches/orderbook-mid-price-memory-cache.ts, indexer/services/ender/src/lib/block-processor.ts, indexer/services/ender/src/lib/on-message.ts
logger.info downgraded to logger.debug in shouldSkipBlock, the orderbook mid-price update loop, both skipped-event paths in validateAndAddHandlerForEvent, and four processing/decode logs in onMessage and getIndexerTendermintBlock.
Socks service log level changes
indexer/services/socks/src/websocket/index.ts, indexer/services/socks/src/lib/message-forwarder.ts, indexer/services/socks/src/lib/subscription.ts
Six websocket lifecycle log statements downgraded; three message-forwarder logs (commit/heartbeat, two missing-connection paths) downgraded; emitSubscriptionMetrics logs downgraded with an added non-empty guard on maxSubscriptionsByChannel.
Vulcan order handler log level changes
indexer/services/vulcan/src/handlers/order-place-handler.ts, indexer/services/vulcan/src/handlers/order-remove-handler.ts, indexer/services/vulcan/src/handlers/order-update-handler.ts
Entry and completion log statements downgraded in OrderPlaceHandler, four statements in OrderRemoveHandler (receive, processed, Indexer-expired, diagnostic), and two in OrderUpdateHandler.
Roundtable and Comlink log level changes
indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts, indexer/services/comlink/src/request-helpers/request-logger.ts
Six PNL tick helper log statements downgraded across getPnlTicksCreateObjects and getNewPnlTick; comlink request-logger finish-event structured log downgraded.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • dydxprotocol/v4-chain#2238: Modifies the same batch/forwarding log statements in indexer/services/socks/src/lib/message-forwarder.ts.
  • dydxprotocol/v4-chain#2133: Touches the same onMessage logging in indexer/services/ender/src/lib/on-message.ts for Kafka message processing verbosity.
  • dydxprotocol/v4-chain#3136: Modifies emitSubscriptionMetrics output in indexer/services/socks/src/lib/subscription.ts for the same per-channel subscription metrics.

Suggested labels

indexer

Suggested reviewers

  • adamfraser
  • tqin7

Poem

🐇 Hush now, little logs so loud,
Your info shouts rang clear and proud.
But debug whispers, soft and low,
Is all we need to watch the flow.
Less noise means more for rabbit eyes—
Now only true alerts shall rise! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: switching high-frequency logging calls from info to debug level across multiple services.
Description check ✅ Passed The description includes a comprehensive changelist and deployment notes, but is missing the Test Plan section and Author/Reviewer Checklist from the required template.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@Kefancao Kefancao merged commit 48c55a1 into dydxprotocol:main Jun 16, 2026
18 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants