Skip to content

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

Merged
mattbodle merged 1 commit into
mainfrom
chore/remove-attribute-setter-called
Sep 8, 2026
Merged

mattbodle merged 1 commit into
mainfrom
chore/remove-attribute-setter-called

Conversation

@mattbodle

Copy link
Copy Markdown
Collaborator

Background

  • ATTRIBUTE_SETTER_CALLED was added on 2026-08-31 in feat(rokt): add diagnostic logging for setter/selectPlacements timing #1386 (65bc3d39, Alexander Sapountzis) as a reland of closed mparticle-javascript-integration-rokt Bump @types/chai from 4.2.11 to 4.2.15 #130 (302291a, 2026-08-28).
  • It is an INFO diagnostic fired on every setUserAttribute, removeUserAttribute, onUserIdentified, onLoginComplete, onLogoutComplete, and onModifyComplete call, logging attribute keys only (never values) so downstream could correlate setter timing with selectPlacements from timestamps and page URL.
  • In production it is flooding ecommerce-diagnostics-api (reporter: mp-wsdk, kit 3.1.0) — on the order of tens of millions of INFO logs per week.

What Has Changed

  • Stop emitting ATTRIBUTE_SETTER_CALLED from the Rokt kit setter/identity paths.
  • Remove buildSetterDiagnosticLogEntry and the dedicated setter diagnostic rate-limit transport that existed only to keep this flood from starving other INFO logs.
  • Keep SELECT_PLACEMENTS_DISPATCHED on its own transport.

Screenshots/Video

  • N/A

Checklist

  • Self-review completed
  • Tests added or updated
  • Tested locally

@mattbodle
mattbodle requested a review from a team as a code owner September 8, 2026 18:55
@cursor

cursor Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Observability-only change; user attributes, identity handling, and selectPlacements behavior are unchanged aside from no longer sending those INFO events.

Overview
Stops the Rokt kit from emitting high-volume INFO diagnostics that were flooding ecommerce-diagnostics-api—especially ATTRIBUTE_SETTER_CALLED on every user-attribute and identity callback.

LoggingService is simplified to a single ReportingTransport and log() path; logDiagnostic, logPlacementDiagnostic, and the extra transports that isolated diagnostic rate limits are removed. The diagnosticTiming helpers and all call sites (including SELECT_PLACEMENTS_DISPATCHED before selectPlacements) are deleted. Tests now assert setters do not call loggingService.log for those codes and drop coverage of the removed APIs.

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

Comment thread kits/rokt/src/diagnosticTiming.ts
Remove ATTRIBUTE_SETTER_CALLED and SELECT_PLACEMENTS_DISPATCHED timing
diagnostics, including diagnosticTiming.ts and logPlacementDiagnostic.
@mattbodle
mattbodle force-pushed the chore/remove-attribute-setter-called branch from 041041b to e634383 Compare September 8, 2026 19:59
@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

@mattbodle
mattbodle merged commit 1542678 into main Sep 8, 2026
65 of 66 checks passed
rmi22186 added a commit that referenced this pull request Sep 9, 2026
…ogs (#1405)" (#1408)

Erroneously merged to main before trunk based development has been rolled out. Will re-apply to v3-development branch.
rmi22186 pushed a commit that referenced this pull request Sep 10, 2026
…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.
github-actions Bot pushed a commit that referenced this pull request Sep 10, 2026
# [3.2.0](v3.1.0...v3.2.0) (2026-09-10)

### Bug Fixes

* **braze:** derive kit versions from package manifests ([#1399](#1399)) ([3fe0073](3fe0073))
* do not resolve query-param keys that name inherited prototype members ([#1375](#1375)) ([b948012](b948012))
* **onetrust:** make async test failures observable ([#1396](#1396)) ([af153c0](af153c0))
* **release:** prioritize Rokt kits release, accept v3 PR targets, increase registry audit timing ([#1397](#1397)) ([28d3a71](28d3a71))
* **rokt:** stop emitting ATTRIBUTE_SETTER_CALLED diagnostic logs ([#1405](#1405)) ([1542678](1542678))

### Features

* **braze:** sync V6 recommended eCommerce events ([#1403](#1403)) ([e59ced7](e59ced7))
* **rokt:** fire early preselect selectPlacements calls on configured pageviews ([#1398](#1398)) ([5920607](5920607))
@mparticle-automation

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

rmi22186 added a commit that referenced this pull request Sep 11, 2026
Re-apply #1405 on v3-development after #1398. Drop setter and
SELECT_PLACEMENTS_DISPATCHED timing diagnostics, but keep preselect
diagnostic helpers and logPlacementDiagnostic.
rmi22186 added a commit that referenced this pull request Sep 11, 2026
…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 added a commit that referenced this pull request Sep 11, 2026
* fix(rokt): stop emitting ATTRIBUTE_SETTER_CALLED diagnostic logs

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

* fix(rokt): drop extra diagnosticTiming spec and restore transport comment

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.
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)
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