json[l] callback: add play/task path info

Add the play and task path info (i.e., filename and line number) to
the JSON that is emitted from the json and jsonl callback plugins,
allowing more accurate post-mortem analysis.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
This commit is contained in:
Jeff Squyres 2023-04-08 07:28:11 -04:00
parent b6587a783e
commit 940d914904
3 changed files with 6 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- json and jsonl - Add the ``path`` attribute into the play and task output

View file

@ -67,6 +67,7 @@ class CallbackModule(CallbackBase):
'play': {
'name': play.get_name(),
'id': to_text(play._uuid),
'path': to_text(play.get_path()),
'duration': {
'start': current_time()
}
@ -79,6 +80,7 @@ class CallbackModule(CallbackBase):
'task': {
'name': task.get_name(),
'id': to_text(task._uuid),
'path': to_text(task.get_path()),
'duration': {
'start': current_time()
}

View file

@ -69,6 +69,7 @@ class CallbackModule(CallbackBase):
'play': {
'name': play.get_name(),
'id': to_text(play._uuid),
'path': to_text(play.get_path()),
'duration': {
'start': current_time()
}
@ -81,6 +82,7 @@ class CallbackModule(CallbackBase):
'task': {
'name': task.get_name(),
'id': to_text(task._uuid),
'path': to_text(task.get_path()),
'duration': {
'start': current_time()
}