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

Azure: AzureMonitorMetrics - change response to be dataplane compliant #69308

Merged
merged 7 commits into from Jul 24, 2023

Conversation

kylebrandt
Copy link
Contributor

@kylebrandt kylebrandt commented May 31, 2023

reference: https://grafana.github.io/dataplane/

Things generally look good as they are in terms of being compliant with dataplane, so this is a small change. This is a bit of an aside, but I noticed the field DisplayName property is set, but that is an older field an per the documentation DisplayNameFromDS should be used instead (https://pkg.go.dev/github.com/grafana/grafana-plugin-sdk-go/data#FieldConfig).

The main current impact of this is that SSE checks for this metadata and takes a different code path that should be predictable. So we should wrap this in a feature flag to be safe, and check that Grafana managed alerts behave as expected (in particular in regards to DisplayName).

@kylebrandt kylebrandt added datasource/Azure Azure Monitor Datasource area/dataplane Dataplane Project (Data type contract) labels May 31, 2023
@kylebrandt kylebrandt added this to the 10.1.x milestone May 31, 2023
@kylebrandt kylebrandt requested a review from aangelisc May 31, 2023 13:22
@github-actions
Copy link
Contributor

Backend code coverage report for PR #69308

Plugin Main PR Difference
azuremonitor 70.8% 70.8% 0%

@github-actions
Copy link
Contributor

Frontend code coverage report for PR #69308
No changes

Copy link
Contributor

@aangelisc aangelisc left a comment

Choose a reason for hiding this comment

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

Thank you for creating this PR @kylebrandt (sorry it took awhile to review). We can merge this in as is and then I'll take a look at making the change for DisplayName 😊

@kylebrandt kylebrandt marked this pull request as ready for review June 14, 2023 16:15
@kylebrandt kylebrandt requested a review from a team as a code owner June 14, 2023 16:15
@kylebrandt kylebrandt requested review from asimpson and removed request for a team June 14, 2023 16:15
@aangelisc
Copy link
Contributor

Shall we merge this @kylebrandt 😊

@kylebrandt
Copy link
Contributor Author

@aangelisc My only hesitation is not having the change under a feature flag (even if it is one on by default, at least it gives a way to go back with downgrading). WDYT?

@aangelisc
Copy link
Contributor

I guess from my PoV these changes aren't very material (we're just adding some metadata to the frame). What situation could you envision where this may need to be reverted? @kylebrandt

@kylebrandt
Copy link
Contributor Author

I guess from my PoV these changes aren't very material (we're just adding some metadata to the frame). What situation could you envision where this may need to be reverted? @kylebrandt

Consumers (e.g. alerting, viz, recorded queries) may hit different code paths if they see dataplane data (which is indicated by the metadata). They have there own switches, but that would impact other data sources as things move forward. So it is safer I think to be able to pull out the change without a downgrade of grafana.

@aangelisc aangelisc requested review from grafanabot and a team as code owners July 24, 2023 11:58
@aangelisc aangelisc requested review from summerwollin and dafydd-t and removed request for a team July 24, 2023 11:58
@aangelisc aangelisc requested review from wbrowne and xnyo July 24, 2023 11:58
@github-actions github-actions bot added type/docs area/frontend pr/external This PR is from external contributor labels Jul 24, 2023
@aangelisc
Copy link
Contributor

Sorry this fell through the cracks @kylebrandt, I've created the feature toggle and made use of it. Let me know if this is okay 😊

# Conflicts:
#	packages/grafana-data/src/types/featureToggles.gen.ts
#	pkg/services/featuremgmt/toggles_gen.csv
#	pkg/services/featuremgmt/toggles_gen.go
#	pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource_test.go
@kylebrandt kylebrandt enabled auto-merge (squash) July 24, 2023 12:18
@kylebrandt kylebrandt merged commit ee60d8c into main Jul 24, 2023
16 checks passed
@kylebrandt kylebrandt deleted the azureMonitorMetricsDataplane branch July 24, 2023 13:50
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/backend area/dataplane Dataplane Project (Data type contract) area/frontend datasource/Azure Azure Monitor Datasource no-backport Skip backport of PR pr/external This PR is from external contributor type/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants