Resolve "Parse example alert payload to return list of payload alert fields"
requested to merge 294266-parse-example-alert-payload-to-return-list-of-payload-alert-fields into master
What does this MR do?
This MR adds a GraphQL query alertManagementPayloadFields
which extract alert fields from a sample payload to be used to define a custom mapping as described in &4443 (closed).
Screenshots (strongly suggested)
GraphQL explorer |
---|
Enable feature flag
Feature.enable(:multiple_http_integrations_custom_mapping)
Query
query Extract($fullPath: ID!, $payload: String!) {
project(fullPath: $fullPath) {
alertManagementPayloadFields(payloadExample: $payload) {
path
label
type
}
}
}
Query variables
{
"fullPath": "root/manual_prometheus", // TWEAK
"payload": "{\"title\":\"value\",\"discarded\":23,\"started_at\":\"2020-01-02 04:05:06\",\"nested\":{\"key\":\"string\"},\"arr\":[\"one\",\"two\"]}"
}
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry - feature flag
- [-] Documentation (if required) - feature flag
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
Related to #294266 (closed)
Edited by Vitali Tatarintev