Context Propagation v2 #436
sidPhoenix17
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A little while back, we released a few changes that helped teams pass the context coming in from their workflow triggers (API call, Slack alert, Pagerduty alert) to the Playbooks. This helped them in the following two ways:
The service or component mentioned in the alert is what you query the metrics / logs for. This will make the debugging information more precise.
You can make a single playbook for all services which have similar architecture and just pass the name of that service for the queries / actions to use. This reusability helps you move faster in covering your use-cases.
This was achieved by adding a pythonic transformer that the user can use to process the incoming trigger request json and make a dictionary that feeds into the playbook’s execution variable pool for that trigger. This sort of works like a lambda/cloud function. The variable needs to be pre-defined in the playbooks for it to get updated using this transformer. Also, all data fields were enabled for variables to be put in them.
As part of these changes, one more use-case came up. While we allowed a user to alter queries in real-time when executing a playbook manually, that still required copy pasting correctly between tasks. We are looking to solve this by allowing a user to write an output exporter function taking the task’s output and the current variable poolset as inputs and re-updating the variable pool. This will allow them to use the output of a task as input in another task which is to be subsequently run. This should add a lot of flexibility for the user. Below is a screenshot of the output exporter.
Beta Was this translation helpful? Give feedback.
All reactions