Repository navigation
Conversation
…d error aggregation (Stellar-split#1069, Stellar-split#1070, Stellar-split#1071, Stellar-split#1072) - Error logging (Stellar-split#1069): introduce ErrorLogger with log levels, Text/JSON formatters, and reliable Memory/Console/Multi storage sinks - Breadcrumb tracking (Stellar-split#1070): add BreadcrumbTracker with bounded ring buffer storage and rich context helpers (HTTP, RPC, transaction, state changes) - Error context (Stellar-split#1071): add ErrorContext with attachment utilities, secret key masking/sanitization, safe BigInt/circular serialization, and fluent builder - Error aggregation (Stellar-split#1072): add ErrorAggregator with normalized message grouping, pattern detection (spikes, recurring failures, cascading failures), and clear reporting - Export modules from SDK root and add comprehensive unit test suites
|
@joromi1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This branch has not been deployed
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.
What this fixes
What changed
src/errorLogger.ts):ErrorLoggerwith log levels (debug,info,warn,error,fatal), priority filtering (isLogLevelEnabled,parseLogLevel), and child logger support with merged context.TextLogFormatterfor human-readable outputs andJsonLogFormatterfor structured logging with safe serialization.LogStoragecontract and implementations:MemoryLogStorage(bounded FIFO ring buffer),ConsoleLogStorage, andMultiLogStorage.src/breadcrumbTracker.ts):Breadcrumbstructure capturing category, message, level, timestamp, and rich data payloads.BreadcrumbTrackerwith helper methods (trackHttp,trackTransaction,trackRpc,trackStateChange,trackUserAction,trackError).RingBufferBreadcrumbStoragewith bounded memory capacity and fast retrieval with filtering.src/errorContext.ts):attachErrorContext,getErrorContext, andhasErrorContextpreserving error prototypes and integrating withStellarSplitError.sanitizeContextrecursively masking Stellar secret seeds (S[A-Z0-9]{55}) and sensitive credential keys, and handling circular references.serializeErrorconverting standard/StellarSplit errors into pure JSON-safe objects with BigInt stringification.ErrorContextBuilder,withErrorContext(sync/async wrapper), andwrapError.src/errorAggregator.ts):ErrorAggregatorwith flexible grouping strategies (code,message,type,component,fingerprint, and custom resolvers).normalizeErrorMessagetemplate normalizer masking dynamic addresses, hashes, numbers, and UUIDs.generateReportwith export formats in text, markdown, and JSON.src/index.ts):Testing
test/errorLogger.test.ts: 13 passing tests (levels, formatters, storage limits, filtering, logger API)test/breadcrumbTracker.test.ts: 11 passing tests (storage efficiency, ring buffer eviction, rich context tracking, fast filtering)test/errorContext.test.ts: 11 passing tests (context attachment, sanitization/masking, BigInt/circular serialization, fluent builder, withErrorContext)test/errorAggregator.test.ts: 13 passing tests (normalization, grouping, pattern detection, reporting in text/markdown/JSON)test/client.test.ts,test/retryPolicy.test.ts,test/network-environment.test.ts(110 passing tests)Issues
closes #1072
closes #1071
closes #1070
closes #1069