Skip to content

fix(rokt): stop emitting ATTRIBUTE_SETTER_CALLED diagnostic logs - #1412

Merged
rmi22186 merged 2 commits into
v3-developmentfrom
fix/rokt-stop-attribute-setter-called
Sep 11, 2026
Merged

fix(rokt): stop emitting ATTRIBUTE_SETTER_CALLED diagnostic logs#1412
rmi22186 merged 2 commits into
v3-developmentfrom
fix/rokt-stop-attribute-setter-called

Conversation

@rmi22186

@rmi22186 rmi22186 commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

Test plan

  • npx vitest run in kits/rokt — 380 tests passing
  • Confirm CI kit tests for Rokt are green
  • Confirm setter / identity / live selectPlacements paths no longer emit ATTRIBUTE_SETTER_CALLED or SELECT_PLACEMENTS_DISPATCHED
  • Confirm preselect diagnostics (PRESELECT_FIRED / MISSED / QUEUED / SKIPPED) still emit

Summary by CodeRabbit

  • Bug Fixes
    • Removed diagnostic timing entries for user-attribute updates, identity events, and placement selection.
    • Placement diagnostics continue to use their dedicated logging channel.
    • Diagnostic timing now covers preselection outcomes, including fired, missed, queued, and skipped results with corresponding reasons.
    • Reduced diagnostic logging for setter and placement-selection operations to provide more focused timing information.

@rmi22186
rmi22186 requested a review from a team as a code owner September 10, 2026 20:45
@cursor

cursor Bot commented Sep 10, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Observability-only change: fewer remote diagnostic logs; preselect and operational logging paths are unchanged in behavior aside from removed noise.

Overview
Stops high-volume timing diagnostics that were flooding ecommerce-diagnostics-api: ATTRIBUTE_SETTER_CALLED (from setUserAttribute, removeUserAttribute, and identity callbacks) and SELECT_PLACEMENTS_DISPATCHED on each selectPlacements dispatch.

diagnosticTiming.ts now only builds preselect entries via buildPreselectDiagnosticLogEntry. LoggingService drops logDiagnostic and its separate ReportingTransport; operational logs still use log(), and logPlacementDiagnostic() remains on its own transport so PRESELECT_* outcomes are not rate-limited by page-view or quota logging.

Tests were updated to assert setters/identity no longer emit those codes, and removed coverage for the deleted builders.

Reviewed by Cursor Bugbot for commit ed3f772. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

📝 Walkthrough

Walkthrough

The Rokt kit removes diagnostic timing for setter, identity, and placement-selection flows. Preselect diagnostics and placement diagnostic logging remain supported. Tests now validate the updated logging behavior.

Changes

Rokt diagnostic logging

Layer / File(s) Summary
Restrict diagnostic logging to preselect outcomes
kits/rokt/src/diagnosticTiming.ts, kits/rokt/src/Rokt-Kit.ts
Removes setter and placement-selection diagnostic builders, the separate diagnostic transport, and related logging calls. Retains placement diagnostic logging.
Update diagnostic logging coverage
kits/rokt/test/src/diagnosticTiming.spec.ts, kits/rokt/test/src/tests.spec.ts
Removes obsolete timing tests and verifies that setter and identity flows emit no diagnostics. Placement diagnostic tests use logPlacementDiagnostic.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: mattbodle, alexs-mparticle

Merge Risk: 🔵 Low · up to ed3f7

The public comment should be narrowed to the payload requirement before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the removal of ATTRIBUTE_SETTER_CALLED diagnostic logs, which is a primary change in the pull request. It does not mention SELECT_PLACEMENTS_DISPATCHED, but the title r…
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rokt-stop-attribute-setter-called

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

kits/rokt/src/diagnosticTiming.ts

Oops! Something went wrong! :(

ESLint: 8.52.0

YAMLException: Cannot read config file: /kits/rokt/eslint.config.mjs
Error: end of the stream or a document separator is expected (9:11)

6 | import globals from 'globals';
7 |
8 | const vitestGlobals = {
9 | describe: 'readonly',
----------------^
10 | it: 'readonly',
11 | test: 'readonly',
at generateError (/node_modules/js-yaml/lib/loader.js:183:10)
at throwError (/node_modules/js-yaml/lib/loader.js:187:9)
at readDocument (/node_modules/js-yaml/lib/loader.js:1645:5)
at loadDocuments (/node_modules/js-yaml/lib/loader.js:1688:5)
at Object.load (/node_modules/js-yaml/lib/loader.js:1714:19)
at loadLegacyConfigFile (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2556:21)
at loadConfigFile (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2671:20)
at ConfigArrayFactory._loadConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2975:42)
at ConfigArrayFactory.loadFile (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2841:40)
at createCLIConfigArray (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3649:35)


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

Re-apply #1405 on v3-development after #1398. Drop setter and
SELECT_PLACEMENTS_DISPATCHED timing diagnostics, but keep preselect
diagnostic helpers and logPlacementDiagnostic.
…ment

Match #1405 more closely: delete the setter-only spec file instead of
replacing it with new preselect unit tests already covered by #1398,
and keep the original rate-limit comment on the remaining transport.
@rmi22186
rmi22186 force-pushed the fix/rokt-stop-attribute-setter-called branch from a113562 to ed3f772 Compare September 11, 2026 13:52

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note

Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.

🟡 Other comments (1)
kits/rokt/src/diagnosticTiming.ts-3-3 (1)

3-3: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the logging implementation reference from this public comment.

The term pipeline describes implementation structure. Keep the comment limited to the requirement that diagnostic payloads exclude attribute values.

Proposed change
-// pipeline and payloads can carry customer PII.
+// payloads can carry customer PII.

Source: Path instructions


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: QUIET

Plan: Enterprise

Run ID: 4eabcffb-2111-4887-a9f4-18898e3d03f6

📥 Commits

Reviewing files that changed from the base of the PR and between b60c6a7 and ed3f772.

📒 Files selected for processing (3)
  • kits/rokt/src/Rokt-Kit.ts
  • kits/rokt/src/diagnosticTiming.ts
  • kits/rokt/test/src/diagnosticTiming.spec.ts
💤 Files with no reviewable changes (2)
  • kits/rokt/test/src/diagnosticTiming.spec.ts
  • kits/rokt/src/Rokt-Kit.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@rmi22186
rmi22186 merged commit d1e90dd into v3-development Sep 11, 2026
65 of 66 checks passed
github-actions Bot pushed a commit that referenced this pull request Sep 11, 2026
## [3.2.1](v3.2.0...v3.2.1) (2026-09-11)

### Bug Fixes

* **release:** wait for core npm visibility before publishing kits ([#1413](#1413)) ([1d5bf55](1d5bf55))
* **rokt:** stop emitting ATTRIBUTE_SETTER_CALLED diagnostic logs ([#1412](#1412)) ([d1e90dd](d1e90dd)), closes [#1405](#1405) [#1405](#1405) [#1398](#1398)
@mparticle-automation

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 3.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants