feat(browser): support dom.maxStringLength configuration (#6175)#6311
feat(browser): support dom.maxStringLength configuration (#6175)#6311mydea merged 5 commits intogetsentry:masterfrom
Conversation
|
The CI build failed on I'd appreciate any guidance on how to proceed from here. |
|
Thanks for the work! I re-ran the failing tests, all good now. I'll merge this in, so it should go out with the next release 🚀 |
| * @returns generated DOM path | ||
| */ | ||
| export function htmlTreeAsString(elem: unknown, keyAttrs?: string[]): string { | ||
| export function htmlTreeAsString( |
There was a problem hiding this comment.
Hmm, actually, this is technically a breaking change (as this method is exported...), so we can't change the signature in that way 😬
Can you make this:
export function htmlTreeAsString(
elem: unknown,
keyAttrs?: string[],
options?: { maxStringLength?: number }
) {}It's not as nice, but will have to do for now!
Or, alternatively, make it a union type:
export function htmlTreeAsString(
elem: unknown,
options?: { keyAttrs?: string[], maxStringLength?: number } | string[]
) {}And handle this in the code?
There was a problem hiding this comment.
Agh thanks! I didn't think through how this function isn't merely exposed to other packages within this repo, but that it's also exposed anywhere that imports @sentry/utils. I've updated to that latter format, and I've restored the test for the original format.
3c99a73 to
052be4b
Compare
mydea
left a comment
There was a problem hiding this comment.
Thanks for the PR! This will go out with the next release 🎉
Implements the configuration feature described in #6175 . This lets sentry users opt in to having longer, potentially more helpful, UI breadcrumbs.
Closes #6175