Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Application Insights querying #22355

Open
JorTurFer opened this issue Feb 6, 2024 · 4 comments
Open

Support Application Insights querying #22355

JorTurFer opened this issue Feb 6, 2024 · 4 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. Monitor - ApplicationInsights needs-team-attention This issue needs attention from Azure service team or SDK team

Comments

@JorTurFer
Copy link

JorTurFer commented Feb 6, 2024

Service Package Request

Currently, we have SDK for multiple services, but Application Insights isn't included between them. In KEDA we are consolidating the Azure SDKs to use github.com/Azure/azure-sdk-for-go SDKs, as it has a huge improvement thanks to use github.com/Azure/azure-sdk-for-go/sdk/azidentity.

During the process, I've noticed that there isn't any way to directly query application insights and the only option that we have is to continue using github.com/Azure/go-autorest/autorest and managing the token providers by our side. After a review, I've found that for directly querying we should hit api.applicationinsights.io but this SDK only supports indirect queries via api.loganalytics.io and it requires more information (like the resource group where the Insights is). Currently, github.com/Azure/go-autorest/autorest just requires the InsightsID thanks to use api.applicationinsights.io

@JorTurFer JorTurFer changed the title Add support for Application Insights querying Support Application Insights querying Feb 6, 2024
@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - ApplicationInsights needs-team-triage This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 6, 2024
@jhendrixMSFT
Copy link
Member

Hello @JorTurFer can we get more info on what's broken in your scenario and how you're using github.com/Azure/go-autorest/autorest to resolve it?

@JorTurFer
Copy link
Author

JorTurFer commented Feb 6, 2024

Hi @jhendrixMSFT
Actually, nothing is broken with our scenario. We are successfully working with autorest (this is the implementation that we use).

The main problem is that autorest uses it's own authorizer, which is not compatible with azcore.TokenCredential, so we had had to implement the token request process. As we in KEDA support multiple Azure Services, we use several ways to request the tokens as each service SDK has it's own authentication way.

Thanks to the increase of covered services by azure-sdk-for-go, we have been able to migrate all the services from the old SDKs to the new ones based on this repo, which is nice because all of them are build with support for azidentity, allowing us to unify also that part. We also use kusto SDK (github.com/Azure/azure-kusto-go/kusto) but they have supported azidentity too, so for us it's nice.

I have thought also in asking for support in Application Insights SDK for go, but it looks like abandoned (last commit was 2 years ago).

The good point from api.applicationinsights.io API is that just a token and the resource ID are enough for querying, meanwhile for querying the same metric using the monitoring API requires several extra parameters just for the same query

@jhendrixMSFT jhendrixMSFT removed Client This issue points to a problem in the data-plane of the library. needs-team-triage This issue needs the team to triage. labels Feb 6, 2024
@github-actions github-actions bot added the needs-team-attention This issue needs attention from Azure service team or SDK team label Feb 6, 2024
@jhendrixMSFT
Copy link
Member

Got it, thanks for clarifying. I don't know what our plans are for an AppInsights SDK. I've assigned this to @sandeep-sen for comments.

@jhendrixMSFT jhendrixMSFT added feature-request This issue requires a new behavior in the product in order be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 7, 2024
@JorTurFer
Copy link
Author

Do you have any update @sandeep-sen ? 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. Monitor - ApplicationInsights needs-team-attention This issue needs attention from Azure service team or SDK team
Projects
None yet
Development

No branches or pull requests

3 participants