Skip to content

feat: implement Rokt reporting service in kit#70

Open
alexs-mparticle wants to merge 5 commits intodevelopmentfrom
feat/reporting-service-migration-kit
Open

feat: implement Rokt reporting service in kit#70
alexs-mparticle wants to merge 5 commits intodevelopmentfrom
feat/reporting-service-migration-kit

Conversation

@alexs-mparticle
Copy link
Collaborator

@alexs-mparticle alexs-mparticle commented Mar 20, 2026

Summary

  • Adds ErrorReportingService — Rokt-specific error/warning reporting with rate limiting, endpoint routing, and Rokt headers
  • Adds LoggingService — informational log reporting to Rokt logging endpoint
  • Adds RateLimiter — per-severity rate limiting (10 per severity per session)
  • Registers both services with core SDK during initForwarder() via registerErrorReportingService / registerLoggingService
  • 22 new test cases covering endpoint routing, enable/disable logic, headers, payloads, rate limiting, and registration

Depends on core SDK PR: mParticle/mparticle-web-sdk#1224

Test plan

  • Lint passes
  • Build passes
  • Karma tests pass (Chrome + Firefox)
  • Verify reporting service sends to correct Rokt endpoints
  • Verify rate limiting works per severity
  • Verify registration with mParticle SDK

@alexs-mparticle alexs-mparticle marked this pull request as ready for review March 20, 2026 20:41
@alexs-mparticle alexs-mparticle changed the base branch from main to development March 20, 2026 20:49
@alexs-mparticle alexs-mparticle marked this pull request as draft March 20, 2026 20:55
@alexs-mparticle alexs-mparticle marked this pull request as ready for review March 23, 2026 18:01
- Add ErrorReportingService with Rokt-specific endpoints, headers, rate limiting
- Add LoggingService for informational log reporting
- Add RateLimiter for per-severity rate limiting
- Register services with core SDK during initForwarder()
- Add comprehensive test coverage for reporting, logging, and rate limiting
- Replace setStore/store pattern with constructor params (integrationName, accountId)
- Fix doubled generateIntegrationName() call
- Add rateLimiter param to LoggingService for symmetry
- Move reporting class exposure from window.RoktReporting to testHelpers
- Add temporary debug logs for manual testing
Match core SDK rename of registerErrorReportingService/registerLoggingService
to _registerErrorReportingService/_registerLoggingService.
Extract shared transport logic (headers, rate limiting, request building,
fetch) into ReportingTransport. ErrorReportingService and LoggingService
now each hold a transport instance and delegate sending to it.

- ErrorReportingService: owns errorUrl only, handles ERROR/WARNING
- LoggingService: owns loggingUrl only, handles INFO, falls back to
  error reporter on failure via onError callback
- Each service gets its own transport with independent rate limiting
@alexs-mparticle alexs-mparticle force-pushed the feat/reporting-service-migration-kit branch from 8ff7f56 to 10a3994 Compare March 23, 2026 22:36
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.

1 participant