Generate the rest API orders for debugging purpose when calling something from azure sdk
See original GitHub issueHi,
It could be really useful for debugging purpose to get the equivalent rest api calls that are made when we call something in azure SDK.
For example :
const postgresCli = new PostgreSQLManagementClient(azureCredential, subscriptionId);
const fwRules = postgresCli.firewallRules.listByServer(azResourceGroup, azPostgresServerName);
I’d like to have the rest api calls at runtime displayed in the logs,
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{azResourceGroup}/providers/Microsoft.Sql/servers/{azPostgresServerName}/firewallRules?api-version=2021-02-01-preview
Perhaps, there is already a way to do that, but I didn’t find it.
Regards, Blured.
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Debug for azure sdk (How to show the relevant REST API)
I wanted to use the existing sdk calls and get the relevant created rest api calls displayed in logs. And then analyse the...
Read more >Azure REST API reference documentation - Microsoft Learn
Reference documentation for Azure REST APIs including their supported operations, request URI parameters and request bodies, responses, ...
Read more >Azure REST API Reference - Microsoft Learn
Welcome to the Azure REST API Reference. Representational State Transfer (REST) APIs are service endpoints that support sets of HTTP operations ...
Read more >Debug APIs in Azure API Management using request tracing
Trace a call · Sign in to the Azure portal, and navigate to your API Management instance. · Select APIs. · Select Demo...
Read more >Use Azure SDKs for JavaScript and TypeScript - Microsoft Learn
Want to make REST calls directly because you don't want the entire SDK to use a single REST API or you want deeper...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’ve been trying to go back and add better error messages / log statements for this reason (e.g. https://github.com/Azure/azure-sdk-for-js/blob/4bbe22736dcbe6c316dc6f628273e4f30fe022c2/sdk/identity/identity/src/credentials/clientCertificateCredential.ts#L121 )
When we figure out the cause here perhaps we can add something specific to this scenario that would speed up diagnosis next time. /cc @KarishmaGhiya
@blured75 Can you try to add the following way in your code. This should be able to log some information you needed