feat(perf): Add performance measuring api#117
Open
TatianaFomina wants to merge 38 commits intomasterfrom
Open
Conversation
neSpecc
reviewed
Mar 15, 2025
neSpecc
reviewed
Mar 15, 2025
…saction generation
… send timeout logic
… spans and remove Transaction inheritance
…performance monitoring capabilities
… performance monitoring settings
…performance and utility modules
neSpecc
requested changes
Mar 15, 2025
neSpecc
reviewed
Mar 15, 2025
neSpecc
reviewed
Mar 15, 2025
…ormance monitoring structure
…ch sending method to use setTimeout
…ant for the token and remove unused transaction generation buttons for improved clarity and performance.
…for transactions. Update documentation and README to reflect new settings, including changes to transaction filtering criteria. Remove unused demo elements from example HTML for improved clarity.
…sistency and improving documentation clarity. Update comments to enhance understanding of methods and parameters.
…pan and Transaction classes, including descriptions for properties and methods. Remove unused types from performance module and update imports for better clarity and organization.
…readability. Adjust formatting for better alignment and clarity, and update import statements for consistency.
neSpecc
reviewed
Mar 17, 2025
| * | ||
| * @param transaction - Transaction to queue | ||
| */ | ||
| public queueTransaction(transaction: Transaction): void { |
Member
There was a problem hiding this comment.
Suggested change
| public queueTransaction(transaction: Transaction): void { | |
| public enqueueTransaction(transaction: Transaction): void { |
| if (this.sendQueue.length > 0) { | ||
| void this.processSendQueue(); | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
sendRetries should be cleared as well
| * @param p - Percentile to calculate (e.g., 50 for median, 95 for 95th percentile) | ||
| * @returns Percentile value | ||
| */ | ||
| private percentile(sortedValues: number[], p: number): number { |
| * @param p - Percentile to calculate (e.g., 50 for median, 95 for 95th percentile) | ||
| * @returns Percentile value | ||
| */ | ||
| private percentile(sortedValues: number[], p: number): number { |
Member
There was a problem hiding this comment.
maybe sorting should be a part of this method?
| * @param values - Array of numbers | ||
| * @returns Average value | ||
| */ | ||
| private average(values: number[]): number { |
|
|
||
| this.sendRetries.set(tx.id, retryCount); | ||
|
|
||
| const shouldRetry = retryCount <= MAX_SEND_RETRIES; |
Member
There was a problem hiding this comment.
I think retrying should be a part of Transport
| /** | ||
| * Queues this transaction for sending to the server | ||
| */ | ||
| private queueForSending(): void { |
Member
There was a problem hiding this comment.
Suggested change
| private queueForSending(): void { | |
| private enqueueForSending(): void { |
neSpecc
reviewed
Mar 17, 2025
| ``` | ||
|
|
||
| ## Performance Monitoring | ||
|
|
Member
There was a problem hiding this comment.
- explain what is Transaction and Span.
- move API Reference on the first place
- optimization explanation is a technical detail, so it should be placed after usage description
neSpecc
reviewed
Mar 17, 2025
| /** | ||
| * Total number of transactions in this group | ||
| */ | ||
| count: number; |
neSpecc
reviewed
Apr 2, 2025
| token: this.token, | ||
| catcherType: 'performance', | ||
| payload: { | ||
| transactions, |
Member
There was a problem hiding this comment.
lets rename to aggregatedTransactions
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.
Performance Monitoring API
This PR adds a new Performance Monitoring API to track application performance metrics.
Features
API