question

JackBlower2 avatar image
0 Votes"
JackBlower2 asked SwathiDhanwada-MSFT commented

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

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
· 1
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.

@JackBlower2 Thanks for reaching out. I am checking internally with the team and will update you soon.

1 Vote 1 ·

1 Answer

SwathiDhanwada-MSFT avatar image
1 Vote"
SwathiDhanwada-MSFT answered SwathiDhanwada-MSFT commented

@JackBlower2 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.


· 2
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.

Thanks very much for getting back to me!

That's great that it's possible to retrieve the data currently programmatically thanks.

Unfortunately it seems like Grafana will only accept data in Log Analytics format for Annotations and so I assume I'll have to send the Release Annotation and also send a Custom Event to Application Insights that can be queried in Log Analytics for Grafana.

Do you know if it's on the radar that the Release Annotations will be send to Log Analytics too in the near future please?

Thanks again! =)

0 Votes 0 ·

@JackBlower2 Engineering team are aware of this. However, there isn't any ETA for it as of now.

1 Vote 1 ·