1

I've been using this library to fetch ApplicationInsights data from Azure (https://www.nuget.org/packages/Microsoft.Azure.ApplicationInsights/), but it's only a preview library and is kind of dated (last updated 19/04/2018).

I'm using an AD role associated with my ApplicationInsights data to permit it's use - which works - but I would like to use a package that's a bit more modern/supported. Is there an updated version of this package that I'm missing or an alternative to the ApplicationInsightsDataClient hidden in the main ApplicationInsights nuget package that I'm missing (I really don't want to have to build my own REST wrapper since I am sure this is something that Microsoft or someone else has done already)?

Thanks!

gplumb
  • 712
  • 6
  • 29

1 Answers1

2

Edit (October 2021)

New library is released by Microsoft so current answer is Azure.Monitor.Query

Old Answer

Microsoft.Azure.ApplicationInsights.Query package is supported one, and new preview was released just today.

It looks like that package you're using should be deprecated, but I see it is still linked from the Application Insights REST API documentation, not sure what is the best way to contact Microsoft in order to fix it.

EDIT: Everything seem to be fixed now. Microsoft.Azure.ApplicationInsights package is deprecated on nuget.org, suggested alternative is Microsoft.Azure.ApplicationInsights.Query and documentation points to correct package.

oderibas
  • 1,575
  • 12
  • 20
  • That's interesting, the previous version was also dated 2018... My guess is it was updated because of a breaking change in the .net 5 preview. Annoyingly, the ApplicationInsights package contains a bug where custom event metrics aren't returned, so even that library isn't fit for purpose :-( – gplumb Sep 29 '20 at 09:44
  • @gplumb If you don't report bugs, they don't get fixed. https://github.com/Azure/azure-sdk-for-net/issues – Ian Kemp Sep 29 '20 at 09:46
  • @IanKemp I appreciate that, was already filing a ticket. – gplumb Sep 29 '20 at 09:49
  • I filed a bug for the custom event deserialization issue here: https://github.com/Azure/azure-sdk-for-net/issues/15524 – gplumb Sep 29 '20 at 10:39
  • @gplumb This is exactly why this new preview was released. It fixes issue with custom dimensions. I filed issue and helped to resolve it: https://github.com/Azure/azure-sdk-for-net/blob/Microsoft.Azure.ApplicationInsights.Query_0.9.0-preview.2/sdk/applicationinsights/Microsoft.Azure.ApplicationInsights.Query/CHANGELOG.md – oderibas Sep 29 '20 at 11:05
  • I saw the commit and I added it to my github issue :-) The fix (which happened 12 days ago) was to https://www.nuget.org/packages/Microsoft.Azure.ApplicationInsights.Query - not https://www.nuget.org/packages/Microsoft.Azure.ApplicationInsights. With any luck it's just an internal build dependency in the latter package and Microsoft just need to repackage. Let's see what happens when the US come online and triage the ticket. – gplumb Sep 29 '20 at 12:32
  • 1
    @gplumb No, it is not internal dependency. It has mostly the same API as Microsoft.Azure.ApplicationInsights, I switched my code without having to do too many changes. It looks like all this is result of moving of source code between repositories. Code was moved and new version was released with new name but the same version number: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/applicationinsights – oderibas Sep 29 '20 at 14:49
  • 1
    Ahh (and urgh!) :-) I've cobbled something together using the other library for now. I will update the github ticket – gplumb Sep 29 '20 at 15:09