Is it possible to retrieve Release Annotations from Application Inisights programatically through a query?

Jack Blower 1 Reputation point
2021-03-16T16:14:27.757+00:00

It's possible to upload Release Annotations to Application Insights (https://azure.microsoft.com/en-gb/blog/application-insights-announces-availability-of-release-annotations/), but I'd like to query these in Grafana (using a Log Analytics query or similar) to add Deployment markers to Grafana.

Is it possible to programmatically retrieve these markers, preferably a kusto query or the like that can be queried directly from Grafana.

(Note we don't have access to be able to also store deployment info inside Grafana itself)

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,783 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 17,321 Reputation points
    2021-03-24T08:44:47.247+00:00

    @Jack Blower Apologies for late response. Currently Annotations data is not sent to Log Analytics yet , however you can query annotations via ARM.

    You need to send a GET to ARM endpoint:

    https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/Annotations?start=2021-02-09T23%3A26%3A00.000Z&end=2021-02-26T23%3A26%3A00.000Z&api-version=2015-05-01

    Replace subscriptionId, resourceGroupName and resourceName with ones you want to query.Also replace the start and end query params value to the time duration that your annotations were created (if they are blank, server will return Invalid Request).You should also need to provide a proper Authorization token in the header.

    1 person found this answer helpful.