Can Azure Application Insights be used as APM via rest API?

Viewed 377

Application insights can used to monitor custom application events (such as calls, exceptions, durations etc). The documentation gives SDKs for .net, and an agent for java. https://docs.microsoft.com/en-us/azure/azure-monitor/app/platforms

We are using java, but its hosting by Adobe (its their cloud CMS called AEM), so we cant run or install any agent. We can include java libraries, and cam make rest calls going out.

The question is, does AI have any sort of rest API to get application monitoring data into AI? Azure as a whole has one (e.g. for querying resource groups) https://docs.microsoft.com/en-us/rest/api/azure/

NOTE: this is not to query AI data, there is a specific API for that, we need an API to write the event and telemetry data into it.

1 Answers

I don't think it is officially published (REST API for ingestion).

At the same time the wire protocol is used by both all SDKs and by many customers who decided to use REST API directly. So, essentially REST API will not change.

One way is to build an app using agent, sniff wire protocol using Fiddler (or similar tool) and then use it as REST API.

Beware that Application Insights SDKs (and agents) take care of many things - starting from auto collection, calculating standard metrics and finishing with proper backoff logic/retries/etc.

On top of it Application Insights SDKs support two channels - Standard and Real-time (Live Metrics/Diagnostics). Implementing the second channel might be quite tricky.

Related