question

ClaudiaFerguson avatar image
0 Votes"
ClaudiaFerguson asked stan edited

if injection of the logs to Azure LAW directly is supported.

I had a question for Log analytics that I would like to confirm the answer

It is possible for APP to inject the logs directly to Azure LAW vs going through App Insights first".

I found out from the two references below that "you can use the HTTP Data Collector API to send log data to a Log Analytics workspace in Azure Monitor from any client that can call a REST API".

I would like to get a confirmation that this is the case to move forward. Thank you so much!

Below are the references:

How to ingest Azure web app/web job custom logs into a Azure Monitor Log analytics workspace - Stack Overflow
https://stackoverflow.com/questions/56669888/how-to-ingest-azure-web-app-web-job-custom-logs-into-a-azure-monitor-log-analyti

Azure Monitor HTTP Data Collector API - Azure Monitor | Microsoft Docs
https://docs.microsoft.com/en-us/azure/azure-monitor/logs/data-collector-api

azure-monitor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

stan avatar image
0 Votes"
stan answered

Hi,
App Insights has some pre-defined tables that you insert data into. Those tables have specific schema related to monitoring apps/web apps. It is possible to use the HTTP Data collector API but then you will have a custom table where the data will be sent. When you use the HTTP Data collector API keep in mind that the data will not be visible into the App Insights experience. You can still use some of the common features like alerts. If you have app I would suggest using the App insights integration to monitor rather than using HTTP Data Collector API. The latter is more useful if you have some logs that do not fit into the App insights model or you do not want to use App insights at all for your app monitoring. Keep in mind that there is a new API for sending custom logs. That API will replace the HTTP Data Collector API in the future. Currently no deprecation dates are announced. Usually when deprecation is announced you have 1 to 3 years to migrate from the time of announcement.

Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.