Is there any REST Api available to ingest custom logs/events to Application insights

RohanM 0 Reputation points Microsoft Vendor
2024-11-06T06:09:09.18+00:00

I was searching for a REST api which can help me insert logs and custom events into AppInsights by calling this REST api from anywhere i want.

I did came across this document below

https://learn.microsoft.com/en-us/rest/api/application-insights/

But it seems that the APIs in the above document can only retrieve the data from App insights and not insert the data to App Insights.

Another document i came across is the Azure API management integration with Application Insights.

https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-app-insights?tabs=rest

In this approach i need to create a Azure API management Instance and connect it with Application insights. And then use the Emit-event policy to ingest customEvents to the AppInsights. Has anyone used this approach before ?

PS: I know that we have the .net SDK available for ingesting data. But i dont want to write code. I want a REST endpoint which i could call from lets say ADF or Logic app using the HTTP connector

Please suggest if there is any approach available.

Thanks

Rohan

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,377 questions
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,221 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,555 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshukatara-6769 11,780 Reputation points
    2024-11-06T10:28:19.8133333+00:00

    Hello Rohan ,

    Yes, there is a REST API available to ingest custom logs and events into Application Insights. You can use the Application Insights core telemetry API to send custom events and metrics. This API allows you to track various user actions and monitor performance by sending telemetry data from different types of applications, including device and desktop apps, web clients, and web servers.

    To get started, you need to add the Application Insights SDK to your project and use methods like TrackEvent to log user actions or other events.

    References:

    Please check if it helps you

    Thanks

    Deepanshu

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.