feat: implement Rokt reporting service in kit#70
Open
alexs-mparticle wants to merge 5 commits intodevelopmentfrom
Open
feat: implement Rokt reporting service in kit#70alexs-mparticle wants to merge 5 commits intodevelopmentfrom
alexs-mparticle wants to merge 5 commits intodevelopmentfrom
Conversation
3 tasks
- 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
8ff7f56 to
10a3994
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ErrorReportingService— Rokt-specific error/warning reporting with rate limiting, endpoint routing, and Rokt headersLoggingService— informational log reporting to Rokt logging endpointRateLimiter— per-severity rate limiting (10 per severity per session)initForwarder()viaregisterErrorReportingService/registerLoggingServiceDepends on core SDK PR: mParticle/mparticle-web-sdk#1224
Test plan