fix: avoid overriding route span attributes in PageSpanProcessor#968
Conversation
Dependency ReviewThe following issues were found:
License Issuespackage-lock.json
OpenSSF Scorecard
Scanned Files
|
| files: ['src/**/*.test.ts', 'src/**/*.test.tsx'], | ||
| plugins: [ | ||
| vitePlugin({ | ||
| optimizeDeps: { |
There was a problem hiding this comment.
@overbalance I had to remove this because when running react inside the tests it was trying to import everything from ESM, I tried to add all the exceptions here but the list just started to grow with a lot of internal libraries and I didn't see the point of keep adding them. Let me know if there's anything else we can do here
There was a problem hiding this comment.
this was added specifically to deal with test failures in CI: #709, which do seem to have reoccurred here with the removal: https://github.com/embrace-io/embrace-web-sdk/actions/runs/19309537240/job/55225832277?pr=968
There was a problem hiding this comment.
Worked with Jared to get this working, we think in the future we can move to vitest browser directly to avoid using web-test-runner with these weird configurations
Performance resultsCDP Performance Tests
Lighthouse Startup Performance Tests
|
build resultsvite-7 Platform Tests
vite-otel-latest Platform Tests
webpack-5 Platform Tests
|
| files: ['src/**/*.test.ts', 'src/**/*.test.tsx'], | ||
| plugins: [ | ||
| vitePlugin({ | ||
| optimizeDeps: { |
There was a problem hiding this comment.
this was added specifically to deal with test failures in CI: #709, which do seem to have reoccurred here with the removal: https://github.com/embrace-io/embrace-web-sdk/actions/runs/19309537240/job/55225832277?pr=968
There was a problem hiding this comment.
are these modelled after waitFor/render from '@testing-library/react'? Should we just include that as another dev dependency?
There was a problem hiding this comment.
I did them manually but yes I would guess it's pretty much the same. I didn't want to add an extra dependency for 2 simple functions, maybe in the future if we see the need of keep testing react deeper?
overbalance
left a comment
There was a problem hiding this comment.
I recommend pinning the react-router-dom deps to newest version in order to match the existing package.json convention.
Goal
Testing
We didn't caught this because all our tests were very isolated and none of them was using the PageSpanProcessor combined with the instrumentation tests. React had nothing to do with it but just to have more coverage for the future I added unit tests that render a react app with a router set up to test this more broadly