-
Notifications
You must be signed in to change notification settings - Fork 2
node: reduce breadcrumb size #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6c41841
to
5b03f4d
Compare
d4409e1
to
8555396
Compare
84f390a
to
8d4594f
Compare
1b84aaa
to
0059123
Compare
|
||
return function lengthChunkSplitter(data) { | ||
const remainingLength = maxLength - seen; | ||
if (data.length <= remainingLength) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its weird that later we respect wholeLines information but when the data.length <= remainingLenght we don't. Actually why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because if all data fits into remainingLength
, we don't need to split it. Ergo, line splitting does not occur.
/** | ||
* Splits data into chunks with maximum length. | ||
* @param maxLength Maximum length of one chunk. | ||
* @param wholeLines If `true`, will split chunks before newlines, so whole lines are passed to the chunk. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a description for skip and break?
return id; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the past id meant the id of the added breadcrumb. The breadcrumb id is no in the breadcrumb file. Should we return undefined instead? Or something that indicates that the breadcrumb was not added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated so it returns undefined
. sdk-core
will also handle this.
3acd0ca
to
800f54f
Compare
800f54f
to
7d75b24
Compare
…for FileBreadcrumbsStorage
…ceAttachmentProvider
7d75b24
to
4f54ec2
Compare
Follow up to #228 for Node.