Closed louisquentinjoucla closed 2 years ago
Thanks, looks great!
On Sun, 19 Jun 2022 at 17:27, Quentin Joucla @.***> wrote:
Hey 👋 ,
This PR close #3 https://github.com/mhansen/ansible-trace/issues/3 ! Here how it does looks like with all playbooks with strategy free: [image: image] https://user-images.githubusercontent.com/28892335/174470206-1ec85219-88ea-4915-a294-e72c9c555e5a.png
It is not accurate as we lack of callback to achieve this, bur here how it is done: The play duration event will only be created right before when a task for a given host will start. At the start of a new play, we add an E event for all the plays we created before.
We do one as well at the very end to handle the last play condition.
Even if it is not accurate, it gives a better pictures of what is going on.
Let me know if it is ok for you!
You can view, comment on, or merge this pull request online at:
https://github.com/mhansen/ansible-trace/pull/19 Commit Summary
- 603dc13 https://github.com/mhansen/ansible-trace/pull/19/commits/603dc134515b09ec8383f768293174345b0e5153 feat(play): Add play level trace span
File Changes
(7 files https://github.com/mhansen/ansible-trace/pull/19/files)
- M plugins/callback/trace.py https://github.com/mhansen/ansible-trace/pull/19/files#diff-59bf0502a63f01cc349b53f23de961d54d3b2931aeb949771aec026f6564964c (42)
- M tests/integration/inventories/multiple_hosts.ini https://github.com/mhansen/ansible-trace/pull/19/files#diff-0e9a8854538c971c2577e9c4e5a844ca1b8f8ed1d209f6c859153eddb4cdd1b0 (13)
- M tests/integration/inventories/one_host.ini https://github.com/mhansen/ansible-trace/pull/19/files#diff-6735d29b161303b635b77e674cbc69310f8f6c8267a0f284ca04e69d01338df6 (6)
- A tests/integration/plays/base.yml https://github.com/mhansen/ansible-trace/pull/19/files#diff-09d8eb163ce9e816dac9706bc8d50d9cb2ba41adaf50ce529370a12c83b2a6f3 (17)
- A tests/integration/plays/nested.yml https://github.com/mhansen/ansible-trace/pull/19/files#diff-5f8af5cae1ce59f949d931974453956f45c3fa7838f6b5ee73699226190dc3bb (15)
- A tests/integration/plays/otherplays.yml https://github.com/mhansen/ansible-trace/pull/19/files#diff-f3995f7bcff7817a17c16b63589911c29c47662bbd39c18918b8253d7755f028 (12)
- A tests/integration/tests/plays.py https://github.com/mhansen/ansible-trace/pull/19/files#diff-3476b054a6c9ff33eb686e6a7873a45dbba2f61e1498703b5629888f12fc45ed (37)
Patch Links:
- https://github.com/mhansen/ansible-trace/pull/19.patch
- https://github.com/mhansen/ansible-trace/pull/19.diff
— Reply to this email directly, view it on GitHub https://github.com/mhansen/ansible-trace/pull/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZYONJJMDRBFXKNEFOLA3VP3DWFANCNFSM5ZF6H6OQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hey :wave: ,
This PR close #3 ! Here how it does looks like with all playbooks with strategy free:
It is not accurate as we lack of callback to achieve this, but here how it is done: The play duration event will only be created right before when a task for a given host will start. At the start of a new play, we add an E event for all the plays we created before.
We do one as well at the very end to handle the last play condition.
Even if it is not accurate, it gives a better pictures of what is going on.
Let me know if it is ok for you!