✨ feat(aci): add pagerduty/opsegnie migration utils #83565
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
continues #83123, adding migration helper utils for oncall integrations.
continuing to iterate on ABCs, now have introduced something called a
FieldMapping
dataclass.Why do we need it? - Because we need Actions to work with Issue & Metric Alert registries, we need to consolidate the configuration for each integration for the API & UI.
More concretely, currently we use
severity
to mark priority in Issue Alert handlers andpriority
in Metric Alert. With this mapping we can change the key in the dict.Another use this has is it will let us add sane defaults. Something we can improve is reducing the amount of optional fields in our code. For example, we have things such as
OPSGENIE_DEFAULT_PRIORITY
andPAGERDUTY_DEFAULT_SEVERITY
defined which represent the default priority in the 3p if there is nothing configured. Here, I leverage this dataclass so we save the default value if nothing is configured. This should make the API and the UI much simpler and configurable.closes https://getsentry.atlassian.net/browse/ACI-96
closes https://getsentry.atlassian.net/browse/ACI-97