-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[storage] Fix spans that were not waiting for child subspans #5780
Conversation
Many more functions in clients return Promises directly. Will they have the same issue?
…Sent from my Windows 10 device
From: Jeff Fisher<mailto:[email protected]>
Sent: Thursday, October 24, 2019 12:56
To: Azure/azure-sdk-for-js<mailto:[email protected]>
Cc: Jeremy Meng<mailto:[email protected]>; Review requested<mailto:[email protected]>
Subject: [Azure/azure-sdk-for-js] [storage] Fix spans that were not waiting for child subspans (#5780)
For iterators, we weren't properly waiting for the underlying promise before closing spans.
________________________________
You can view, comment on, or merge this pull request online at:
#5780<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-js%2Fpull%2F5780&data=02%7C01%7CJeremy.Meng%40microsoft.com%7C0aa50ac759e14d5e686f08d758bc51d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637075438165397190&sdata=d8Iz1iHeS9f0MtsRFdi6CoauSyz31vCvQMynv1dQH5w%3D&reserved=0>
Commit Summary
* Fix spans that were not waiting for child subspans
File Changes
* M sdk/storage/storage-blob/src/BlobServiceClient.ts<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-js%2Fpull%2F5780%2Ffiles%23diff-0&data=02%7C01%7CJeremy.Meng%40microsoft.com%7C0aa50ac759e14d5e686f08d758bc51d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637075438165397190&sdata=PdaF3UKIe631%2FcqT6RYfGBdW%2FM3v5ohd7IHiZre41CM%3D&reserved=0> (2)
* M sdk/storage/storage-blob/src/ContainerClient.ts<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-js%2Fpull%2F5780%2Ffiles%23diff-1&data=02%7C01%7CJeremy.Meng%40microsoft.com%7C0aa50ac759e14d5e686f08d758bc51d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637075438165397190&sdata=SgV%2B1T1nOJg%2BNmcKJimz1QSx3w%2FFZPbv6n8cOmgwSsM%3D&reserved=0> (4)
* M sdk/storage/storage-queue/src/QueueServiceClient.ts<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-js%2Fpull%2F5780%2Ffiles%23diff-2&data=02%7C01%7CJeremy.Meng%40microsoft.com%7C0aa50ac759e14d5e686f08d758bc51d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637075438165397190&sdata=bxfhNmhfU0vG%2FgIfUr0hIXyjyP80wZIymIqZgkTGMZs%3D&reserved=0> (2)
Patch Links:
* #5780.patch<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-js%2Fpull%2F5780.patch&data=02%7C01%7CJeremy.Meng%40microsoft.com%7C0aa50ac759e14d5e686f08d758bc51d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637075438165397190&sdata=tqlKDTFjxVCtfogkieRW9Ab9VL%2FgdU%2FLcQs%2FiGWc0Qk%3D&reserved=0>
* #5780.diff<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-js%2Fpull%2F5780.diff&data=02%7C01%7CJeremy.Meng%40microsoft.com%7C0aa50ac759e14d5e686f08d758bc51d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637075438165397190&sdata=%2BsaCoY%2Ff1M8ooIHtfPqkICzd%2B3kJVStanGZ9uNmQs4w%3D&reserved=0>
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-sdk-for-js%2Fpull%2F5780%3Femail_source%3Dnotifications%26email_token%3DABZ3QX3VJSSPR3CS5IH6753QQH4YNA5CNFSM4JEZ2FN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HUGZDOA&data=02%7C01%7CJeremy.Meng%40microsoft.com%7C0aa50ac759e14d5e686f08d758bc51d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637075438165397190&sdata=FfbK3e22e0Hqj725RdhEUeJzjv8ps5tOOWdOiMIAwYA%3D&reserved=0>, or unsubscribe<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABZ3QXZ7MX7RXNSIFUMJARDQQH4YNANCNFSM4JEZ2FNQ&data=02%7C01%7CJeremy.Meng%40microsoft.com%7C0aa50ac759e14d5e686f08d758bc51d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637075438165397190&sdata=mBoohktPIQlkCfsrtkXaMOXf%2BQsjnJ4NE%2FIOahzyCKA%3D&reserved=0>.
|
We always thought Isn't it, @xirzec? Example azure-sdk-for-js/sdk/storage/storage-blob/src/BlobClient.ts Lines 1395 to 1410 in 27910f7
|
Normally, it is redundant, but now that we are essentially wanting to then() off the returned promise, it is not.
Yes, it looks like this bites us in many places. I'll have to go through the spans more thoroughly. |
Updated title to include WIP as we have to review many more scenarios |
@HarshaNalluru I think this new version takes care of all the remaining spans |
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.
Damn!
What about the SDKs of other services, they might have the same problem? |
Waiting for @XiaoningLiu's review. |
I reviewed all the other Spans we're creating in other packages. I found only one issue in Identity (which I added to this PR since it's a 2 line change to add I did also notice that we're instrumenting some list* operations in a questionable way in several of the other packages, so I updated the notes of #5607 to mention that. |
Waiting for @XiaoningLiu and @jiacfan |
For iterators, we weren't properly waiting for the underlying promise before closing spans.
Fixes #5776