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

CloudWatch Logs: Add labels to alert and expression queries #77529

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

iwysiu
Copy link
Contributor

@iwysiu iwysiu commented Nov 1, 2023

What is this feature?

Labels the grouped fields for sync CloudWatch Logs queries with the fields they were grouped on.

Why do we need this feature?

In order for CloudWatch Logs queries returning multiple time series to be useful in alerts, the different time series need to be labeled with their grouping information

Who is this feature for?

Users that want to use CloudWatch Logs queries with multiple time series in alerts.

Which issue(s) does this PR fix?:

Fixes #63388

Special notes for your reviewer:

Making this a bug because it should work, even if it never has.

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@iwysiu iwysiu added this to the 10.3.x milestone Nov 1, 2023
@iwysiu iwysiu added add to changelog no-backport Skip backport of PR labels Nov 1, 2023
@iwysiu iwysiu changed the title CloudWatch Logs: Add labels to logs sync queries CloudWatch Logs: Add labels to alert and expression queries Nov 1, 2023

// set the group key as the display name for sync queries
for i := 1; i < len(newFrame.Fields); i++ {
valueField := newFrame.Fields[i]
for j := 1; j < len(newFrame.Fields); j++ {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed this to a j because I realized it's nested in a for loop using i

@iwysiu iwysiu marked this pull request as ready for review November 2, 2023 14:32
@iwysiu iwysiu requested a review from a team as a code owner November 2, 2023 14:32
@iwysiu iwysiu requested review from fridgepoet and sarahzinger and removed request for a team November 2, 2023 14:32
Copy link
Contributor

@kevinwcyu kevinwcyu left a comment

Choose a reason for hiding this comment

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

nice, tested and labels are showing properly now 🎉

@iwysiu iwysiu added backport v10.2.x type/bug and removed no-backport Skip backport of PR labels Nov 2, 2023
Copy link
Contributor

Hello @iwysiu!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

@iwysiu iwysiu modified the milestones: 10.3.x, 10.2.x Nov 2, 2023
@iwysiu iwysiu merged commit 64e28c0 into main Nov 2, 2023
42 checks passed
@iwysiu iwysiu deleted the iwysiu/63388b branch November 2, 2023 20:26
grafana-delivery-bot bot pushed a commit that referenced this pull request Nov 2, 2023
iwysiu added a commit that referenced this pull request Nov 2, 2023
…#77594)

CloudWatch Logs: Add labels to alert and expression queries (#77529)

(cherry picked from commit 64e28c0)

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
@aangelisc aangelisc modified the milestones: 10.3.x, 10.2.3 Dec 21, 2023
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.

CloudWatch Logs: queries returning multiple time series cannot be used in alert rules
3 participants