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

feat(alerts): add support for titleTemplate to NRQL alert conditions #1141

Merged

Conversation

baNROne
Copy link
Contributor

@baNROne baNROne commented May 15, 2024

Please do not merge yet

Copy link
Contributor

@akane0915 akane0915 left a comment

Choose a reason for hiding this comment

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

See inline comment

@@ -273,6 +275,7 @@ type NrqlConditionUpdateBase struct {
ViolationTimeLimitSeconds int `json:"violationTimeLimitSeconds,omitempty"`
Expiration *AlertsNrqlConditionExpiration `json:"expiration,omitempty"`
Signal *AlertsNrqlConditionUpdateSignal `json:"signal"`
IncidentTitleTemplate *string `json:"incidentTitleTemplate,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

@baNROne I think we'll want to leave off omitempty for NrqlConditionUpdateBase. The reason is because we want a user to be able to remove an incident title template on an existing condition that already has the field configured. This presentation (slides 20-25 particularly) does a great job at explaining the reasoning. https://docs.google.com/presentation/d/1VEYfI7acg8LH_uGHjj5Su4RoF1lQRPVyfxK59xUMxV8/edit?usp=sharing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. Thanks @akane0915. I've updated it.

Copy link
Contributor

@akane0915 akane0915 left a comment

Choose a reason for hiding this comment

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

Looks good. Manually tested with the terraform PR.

@baNROne baNROne changed the title feat(alerts): Add incident title template support feat(alerts): Add title template support May 22, 2024
@baNROne baNROne force-pushed the add-incident-title-template-support branch from 817de1a to 03c6197 Compare May 22, 2024 21:22
@baNROne baNROne requested a review from akane0915 May 22, 2024 21:27
Copy link
Contributor

@akane0915 akane0915 left a comment

Choose a reason for hiding this comment

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

Code looks good, but let's be sure to manually test once the changes are made in the backend and AGQL to update to titleTemplate

fix: Remove omitempty

refactor(alerts): Change field name
@baNROne baNROne force-pushed the add-incident-title-template-support branch from 03c6197 to df71d2d Compare June 26, 2024 18:36
@pranav-new-relic pranav-new-relic changed the title feat(alerts): Add title template support feat(alerts): add support for titleTemplate to NRQL alert conditions Aug 12, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.40%. Comparing base (3ff4ee2) to head (2dd8235).
Report is 83 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1141      +/-   ##
==========================================
- Coverage   38.84%   38.40%   -0.44%     
==========================================
  Files          86       96      +10     
  Lines        5612     4822     -790     
==========================================
- Hits         2180     1852     -328     
+ Misses       3266     2795     -471     
- Partials      166      175       +9     
Flag Coverage Δ
unit 38.40% <ø> (-0.44%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pranav-new-relic pranav-new-relic merged commit 9d143de into newrelic:main Aug 12, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants