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

Enhance per bucket, and per document monitor notification message ctx. #605

Closed
wants to merge 8 commits into from

Conversation

AWSHurneyt
Copy link
Collaborator

@AWSHurneyt AWSHurneyt commented Mar 5, 2024

Description

  1. Added support for printing sample documents for each bucket in bucket level monitor notification messages.
  2. Added support for printing query/rule info in doc level monitor notification messages.

Accomplished this by adding the AlertContext data model, which we can use to store data we only want to expose via the notification message ctx. Storing sample documents, or query/rule lists in the alert document would bloat it; this data model allows us to separate the content of the ctx from the content of the Alert documents.

Issues Resolved

opensearch-project/alerting#1300
opensearch-project/alerting#1396
opensearch-project/alerting#1401

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: AWSHurneyt <[email protected]>
… level monitor notification messages. Added support for printing query/rule info in doc level monitor notification messages.

Signed-off-by: AWSHurneyt <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 73.95%. Comparing base (892c34f) to head (08d6fd7).

Files Patch % Lines
.../commons/alerting/model/AggregationResultBucket.kt 0.00% 4 Missing ⚠️
.../opensearch/commons/alerting/model/AlertContext.kt 93.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main     #605   +/-   ##
=========================================
  Coverage     73.95%   73.95%           
- Complexity      896      901    +5     
=========================================
  Files           133      134    +1     
  Lines          5890     5910   +20     
  Branches        716      717    +1     
=========================================
+ Hits           4356     4371   +15     
- Misses         1222     1226    +4     
- Partials        312      313    +1     

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

riysaxen-amzn
riysaxen-amzn previously approved these changes Mar 6, 2024
@AWSHurneyt AWSHurneyt dismissed stale reviews from riysaxen-amzn and engechas via 08d6fd7 March 11, 2024 20:34
@AWSHurneyt
Copy link
Collaborator Author

Closing this issue as I've moved these changes to the alerting plugin in PR opensearch-project/alerting#1450 based on this feedback #605 (comment)

@AWSHurneyt AWSHurneyt closed this Mar 12, 2024
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.

4 participants