-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(browser): Add graphqlClientIntegration
#13783
base: develop
Are you sure you want to change the base?
feat(browser): Add graphqlClientIntegration
#13783
Conversation
|
Just wanted to inform about the failing tests:
|
dev-packages/browser-integration-tests/suites/integrations/graphqlClient/xhr/test.ts
Outdated
Show resolved
Hide resolved
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.
I finally found the time to review this in depth. Overall, I really like it, I left some comments with requests for changes. Mostly it is about moving stuff around, and avoiding any graphql-specific code in the "general" places. Also, please note that if you rebase this in develop
, there are/will be a bunch of conflicts - this is mostly because the utils
package is deprecated and all that code was moved to core
.
noted, i'll implement the feedback. thanks for the comprehensive review!
will move on with the conflicts if the current implementation checks out |
@@ -0,0 +1,121 @@ | |||
import { SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils'; | |||
import { getBodyString } from '@sentry-internal/replay'; |
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.
@mydea should this util be in the replay package?
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.
if we use/need it here, I would move it to @sentry-internal/browser-utils
, and use it from there both in replay and here!
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.
otherwise, this will lead to circular dependency issues :)
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
- Moved fetch-related operations into the grahqlClient integration. - Used Hint types for `beforeOutgoingRequestSpan` hooks. Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
- Also moved `NetworkMetaWarning` type. Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
…ntegration' into feat/graphqlClientIntegration
Signed-off-by: Kaung Zin Hein <[email protected]>
…s other than string - Moved internal `getFetchRequestArgBody` to `browser-utils`. - Added unit tests. Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
i'm not sure what's making the webkit tests flaky for the added integration tests; locally they all pass on consecutive runs via |
- Moved replay-specific `_serializeFormData` to `browser-utils` and added test. Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Signed-off-by: Kaung Zin Hein <[email protected]>
Resolves #13399
Todo:
Supportfetch
spans and testsSupport shorthand graphql queries (i.e., without a name)Moved to laterEnhance breadcrumb datayarn lint
) & (yarn test
).