Skip to content

Return CorrelationId and OperationId when NoWait switch is used #9070

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

Open
bgelens opened this issue Apr 24, 2019 · 2 comments
Open

Return CorrelationId and OperationId when NoWait switch is used #9070

bgelens opened this issue Apr 24, 2019 · 2 comments
Labels
Azure PS Team feature-request This issue requires a new behavior in the product in order be resolved. Generator Related to cmdlet generator
Milestone

Comments

@bgelens
Copy link

bgelens commented Apr 24, 2019

related issue #7145, #8846

Awesome NoWait is being implemented!

Please make sure that correlationId and operationId information is made part of the PSAzureOperationResponse. AFAICT it currently is not (unless RequestId is actually CorrelationId?) but it is crucial information to handle followup activities.

e.g. monitor based on operationId or have EventGrid subscription trigger some function that uses the CorrelationId provided by EventGrid for matching up the initial invocation.

This information is send as response header under the keys x-ms-correlation-request-id and x-ms-request-id.

@bgelens bgelens added the feature-request This issue requires a new behavior in the product in order be resolved. label Apr 24, 2019
@markcowl
Copy link
Member

@bgelens There is also the x-ms-client-request-id which is often used for client-side correlation of responses / response traces.

In the case of AzureOperationResponse itself, the response headers are available in the object. Agreed that known headers used for corralting requests and retrieving logs should eb first class properties of the returned object in this case.

RequestId is populated from the x-ms-request-id header
OperationId is specific to a particular LRO pattern[AzureAsyncOperation] used by Compute and Network, the OperatioNId cna be used to call up logs for the operation.

BTW, -AsJob which runs LRO operatiosn on a background thread and returns immediately is already implemented acorss all cmdlets, NoWait is specifically for scenarios in which the user will specifically check the status of a request later and does not want a polling thresad.

@bgelens
Copy link
Author

bgelens commented Apr 25, 2019

@markcowl Thanks for the additional information. I was not yet aware yet that OperationId is specific to Network and Compute.

We cannot use AsJob as we are running in Azure Functions and don't want to be blocked handling the next request or keep paying (as the function is monitoring) for something the platform (Azure) can do for us in another way (EventGrid). This is why I'm celebrating this NoWait effort!

@markcowl markcowl added this to the Backlog milestone May 7, 2019
@markcowl markcowl removed their assignment Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure PS Team feature-request This issue requires a new behavior in the product in order be resolved. Generator Related to cmdlet generator
Projects
None yet
Development

No branches or pull requests

3 participants