|
Hey, I am currently reading into jactl and its sync/async execution. I am curious, if there are any means of instrumentation. On the one hand to track timing of custom functions (without calling this explicitely in a script), but on the other hand to also to enrich the result with information (for example sending a HTTP request and returning only a part of the request, while storing request and response in a context to save it for debugging purposes, but not expose it within the script). Maybe via the Thanks so much and have a nice week! --Alex |
Replies: 3 comments 1 reply
|
Interesting question. As you outline, there are two ways to achieve this at the moment:
Do you want state that is per-invocation or shared across all script invocations that share the same JactlContext? |
|
I have committed changes that allow you to specify an "applicationContext" on the JactlContext: This can then be accessed when needed this way: I have also committed changes that allow you to pass a per-invocation context object when invoking To access this context within your custom function: I will release these changes with the next Jactl 2.8.0 release once I finish some other work I am in the middle of. |
|
I have published Jactl 2.8.0 that includes these changes. |
Interesting question. As you outline, there are two ways to achieve this at the moment:
Do you want state that is per-invocation or shared across all script invocations that share the same JactlContext?
It would be trivial to add a method to JactlCont…