-
Notifications
You must be signed in to change notification settings - Fork 295
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
Pass Mutation Name as Endpoint for GraphQL #1349
Conversation
* fix constraints warning by adding leading and trailing constraints for nested stackViews * remove print statement
let path = transaction.request.url?.path { | ||
var path = transaction.request.url?.path { | ||
|
||
if path.contains("graphql"), |
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.
Are we able to add a unit test for this?
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.
Sure, added: df95e39
transactionMetrics.mockConnectStartDate = Date() | ||
transactionMetrics.mockFetchStartDate = Date() |
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.
just curious, how are these two values different? 👀
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.
FetchStartDate: The time when the task started fetching the resource, from the server or locally.
ConnectStartDate: The time immediately before the task started establishing a TCP connection to the server.
Apple has an amazing graphic in their documentation that would explain it better. Apple doc reference
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.
lgtm! 🚀 jw what brought about introducing this change
Thanks for asking. Yes, this change is part of something that was pending in another PR. Currently, we're sending the endpoint of all requests to measure latency. Since the GraphQL requests are the same, the suggestion was to send the name of the mutation to identify it. I'll share some PRs with you in case you want to dive deeper into this. Suggestion: #1321 (comment) |
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.
Nice unit test 👏
Summary of changes
Checklist
Authors