Auto Assign Items in Rollbar based on custom rules per project for both new OR reactivated items.
Download Docker Image: https://hub.docker.com/repository/docker/nkruger/rollbarautoassignment
-
Get your current Rollbar Account Access Token (read or write) from https://rollbar.com/settings/accounts/ACCOUNT_NAME/access_tokens/
This Access Token will be used to setup the WebHook.
-
Create a new WebHook in your Rollbar project under the notifications.https://rollbar.com/ACCOUNT_NAME/PROJECT_NAME/settings/notifications/
-
Enter the URL that the WebHook will send the payload to.
Example: https://yourhostedserver/api/rollbar/ACCOUNTACCESSTOKEN
-
Your webhook is no complete and Rollbar will send payloads to this as configured in your notification options.
-
The Auto Assignment works based on a set of configured rules (Json format).
-
Rules are executed top down in that order. If a match is found the rule is applied and the process terminates to perform the assignment.
Rules can be viewed from the API here (GET): https://yourhostedserver/api/assignmentrules
Rules can be updated from the API here (POST): https://yourhostedserver/api/assignmentrules/ACCOUNTACCESSTOKEN the body is the Json Rules.
-
Example of a basic rule:
[
{
"project_id": 1234,
"event_name": "new_item",
"rules": [
{
"field": "title",
"matchtype": "contains",
"value": "word"
}
],
"assign_to_username": "usernameA"
},
{
"project_id": 1234,
"event_name": "reactivated_item",
"rules": [
{
"field": "title",
"matchtype": "equals",
"value": "word"
}
],
"assign_to_username": "usernameB"
}
]
-
Fields available:
'title', 'root', 'environment', 'framework', 'host', 'language', 'level', 'url'
-
Matchtypes available (string value):
'contains', 'equals', 'startswith'
-
Values that can be suplied:
String based value could be a number or any other value (string).
-
The assign_to_username needs to be exact as the service performs a lookup to identify the user_id to use for the actual assignment.
Feel free to contact the Rollbar Customer Engineering team or log a Issue in GitHub.
Please feel free to add, improve and expand this Auto Assignment service.