I hosted a web API on azure app service using a docker image (linux)
And for production purpose I need all http requests to be logged.
I tried " Diagnostic settings (preview)" and I selected "Archive to a storage account"
, But when I checked my logs I found all http request data except request & response body and header.
So, is there a way to log this details for debugging purpose.
Thanks in advance.
You won't get the response body and header values in the AppServiceHTTPLogs. You can find the description of the log over at https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/appservicehttplogs.
The feature; however, is still in preview though so that means you can submit feedback asking to include the body and header values.
Related
when I called the azure blob storage with REST API, I found inside the response header, it discloses the Server and its version.
Are there any ways to disable the Server key? I don't want the response header showing the Server information.
AFAIK it is not possible to suppress response headers or programmatically control whic response headers to send back.
We have Azure Function app (v.4) with post api calls to some external rest resource. I can see occasional failures in Azure monitoring (Azure Insights), but everything I was able to collect in Logs is external api endpoint url (Path like https://... when you open dependencies) with the request get parameters. In order to troubelshoot the failure I need to collect Form data as well for post requests. I wonder how easy it would be, like as easy as setting some flag in azure configuration or modifying app and writing tracing logs explicitly.
The App Insights -> Transaction Search in the portal will show the requests and trace messages but it will only indicate that the function made a HTTP POST call, the response code and duration of that call, it will not show the payload details, so the function app explicitly need to log those details as TRACE info using ILogger instance that is injected to the function.
I have a logic app that I'm trying to put behind API Management and it's not triggering at all. For testing purposes I created a new logic app with these steps and I'm running into the same issue.
I'm adding the API by selecting Logic App in the APIM portal, setting a suffix of sandbox and adding the unlimited product. The original url for the logic app is https://{baseurl}.logic.azure.com/workflows/{workflow}/triggers/manual/paths/invoke/address/{postalCode}?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig={sig} and the url I'm hitting for the api management endpoint is https://{apim-name}.azure-api.net/sandbox/manual/paths/invoke/address/{postalCode}
The result when I hit the logic app directly is Postal Code: {postalCode} when I hit the api management endpoint it just returns an empty result with a 200 HTTP Code. I can look at the logic app and see it's not getting triggered.
Has any else run into this? Any help would be appreciated.
I don't know why you got 202 with empty result, but I test it success. I got the Postal Code: {postalCode} after request the APIM endpoint(both request in the APIM test and request it in postman). Here I provide my steps for your reference.
1. I create a logic app shown as below:
2. Then I create APIM and configure the logic app url in it.
3. Click the "Send" button in APIM test, get the response shown as below:
4. When request the APIM request url in postman, it also get result success.
Hope it helps~
I depolyed my microsoft bot to azure. After deployment I went to check my bot response through "Test in Web Chat", But it shows message could not send, So I went to channels and view my web chat then it shows "There was an error sending this message to your bot: HTTP status code Unauthorized".
Where I missed ? I do not do any mistakes in microsoft app id and microsoft app password. I correctly updated that.
Please help to resolve this issue.
You need to add the 'production' endpoint in the .bot file. This needs to be added by the developer after deployment, along with App Id and App Password. If your bot file does not have a production endpoint and you don't have the app id and password stored somewhere else, you will have to follow this guide to register your bot on the Azure Portal.
I have answered here: "There was an error sending this message to your bot: HTTP status code NotFound"
But I'll paste the answer here as well for convenience.
What solved my problem was changing the Protocol Setting of the App Service. IF you've deployed your bot using Bot Composer, in the resource group you will find 2 App Services -- one with a 'qna' suffix and the other without. Choose the one without the 'qna' suffix.
Select the App Service --> TLS/SSL settings --> HTTPS Only --> On
I have a REST API running on an Azure server. I turned on Application Logging to "verbose". I can now see all my request coming in, but I can't see the HTTP headers sent by the client. I know they're there, because my code receives them. I tried looking at both the the Application and Web server logs under "Log stream" - not there.
Am I looking at the wrong place? Missing a setting? Is this an authorization issue?
Where can I find my custom HTTP headers in Azure logs?
It seems that this feature is still on the backlog but with no concrete ETA. You may upvote the feature request and keep a watch on for the update.