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

AzureMonitor: select plugin route from cloudname #27273

Merged
merged 2 commits into from Aug 31, 2020
Merged

Conversation

kylebrandt
Copy link
Contributor

@kylebrandt kylebrandt commented Aug 28, 2020

What this PR does / why we need it:
For the Azure Monitor service the Azure Monitor data source, selects the plugin route.

Which issue(s) this PR fixes:
maybe fixes #27243

Notes for Reviewer
#27243 (comment) explains this

@kylebrandt kylebrandt added this to the 7.2 milestone Aug 31, 2020
@kylebrandt kylebrandt marked this pull request as ready for review August 31, 2020 13:54
@kylebrandt kylebrandt requested a review from a team as a code owner August 31, 2020 13:54
@kylebrandt kylebrandt requested review from wbrowne and marefr and removed request for a team August 31, 2020 13:54
Copy link
Member

@marefr marefr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment

var azureMonitorRoute *plugins.AppPluginRoute
for _, route := range plugin.Routes {
if route.Path == "azuremonitor" {
if strings.Contains(route.Path, cloudName) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it still be equals here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think somehow I confused myself when looking at the plugin json and where cloudName comes from in the context of the different services.

Copy link
Member

@marefr marefr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Given the referenced issue is making a request to the backend and not going through the data proxy this should make it work better 👍

@kylebrandt kylebrandt merged commit 06323b8 into master Aug 31, 2020
@kylebrandt kylebrandt deleted the AzureMonChina branch August 31, 2020 15:10
pull bot pushed a commit to digitalocean/grafana that referenced this pull request Aug 31, 2020
* AzureMonitor: select plugin route from cloudname
fixes grafana#27243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not get resource metics data from Azure China
2 participants