@@ -2461,7 +2461,11 @@ let update_vm_internal ~__context ~id ~self ~previous ~info ~localhost =
2461
2461
)
2462
2462
2463
2463
let update_vm ~__context id =
2464
- let @ __context = Context. with_tracing ~__context __FUNCTION__ in
2464
+ let @ __context =
2465
+ Context. with_tracing
2466
+ ~attributes: [(" xapi.event.on.vm" , id)]
2467
+ ~__context __FUNCTION__
2468
+ in
2465
2469
try
2466
2470
if Events_from_xenopsd. are_suppressed id then
2467
2471
debug " xenopsd event: ignoring event for VM (VM %s migrating away)" id
@@ -2484,7 +2488,11 @@ let update_vm ~__context id =
2484
2488
(string_of_exn e)
2485
2489
2486
2490
let update_vbd ~__context (id : string * string ) =
2487
- let @ __context = Context. with_tracing ~__context __FUNCTION__ in
2491
+ let @ __context =
2492
+ Context. with_tracing
2493
+ ~attributes: [(" xapi.event.on.vm" , fst id); (" xapi.event.on.vbd" , snd id)]
2494
+ ~__context __FUNCTION__
2495
+ in
2488
2496
try
2489
2497
if Events_from_xenopsd. are_suppressed (fst id) then
2490
2498
debug " xenopsd event: ignoring event for VBD (VM %s migrating away)"
@@ -2587,7 +2595,11 @@ let update_vbd ~__context (id : string * string) =
2587
2595
error " xenopsd event: Caught %s while updating VBD" (string_of_exn e)
2588
2596
2589
2597
let update_vif ~__context id =
2590
- let @ __context = Context. with_tracing ~__context __FUNCTION__ in
2598
+ let @ __context =
2599
+ Context. with_tracing
2600
+ ~attributes: [(" xapi.event.on.vm" , fst id); (" xapi.event.on.vif" , snd id)]
2601
+ ~__context __FUNCTION__
2602
+ in
2591
2603
try
2592
2604
if Events_from_xenopsd. are_suppressed (fst id) then
2593
2605
debug " xenopsd event: ignoring event for VIF (VM %s migrating away)"
@@ -2696,7 +2708,11 @@ let update_vif ~__context id =
2696
2708
error " xenopsd event: Caught %s while updating VIF" (string_of_exn e)
2697
2709
2698
2710
let update_pci ~__context id =
2699
- let @ __context = Context. with_tracing ~__context __FUNCTION__ in
2711
+ let @ __context =
2712
+ Context. with_tracing
2713
+ ~attributes: [(" xapi.event.on.vm" , fst id); (" xapi.event.on.pci" , snd id)]
2714
+ ~__context __FUNCTION__
2715
+ in
2700
2716
try
2701
2717
if Events_from_xenopsd. are_suppressed (fst id) then
2702
2718
debug " xenopsd event: ignoring event for PCI (VM %s migrating away)"
@@ -2765,7 +2781,11 @@ let update_pci ~__context id =
2765
2781
error " xenopsd event: Caught %s while updating PCI" (string_of_exn e)
2766
2782
2767
2783
let update_vgpu ~__context id =
2768
- let @ __context = Context. with_tracing ~__context __FUNCTION__ in
2784
+ let @ __context =
2785
+ Context. with_tracing
2786
+ ~attributes: [(" xapi.event.on.vm" , fst id); (" xapi.event.on.vgpu" , snd id)]
2787
+ ~__context __FUNCTION__
2788
+ in
2769
2789
try
2770
2790
if Events_from_xenopsd. are_suppressed (fst id) then
2771
2791
debug " xenopsd event: ignoring event for VGPU (VM %s migrating away)"
@@ -2830,7 +2850,11 @@ let update_vgpu ~__context id =
2830
2850
error " xenopsd event: Caught %s while updating VGPU" (string_of_exn e)
2831
2851
2832
2852
let update_vusb ~__context (id : string * string ) =
2833
- let @ __context = Context. with_tracing ~__context __FUNCTION__ in
2853
+ let @ __context =
2854
+ Context. with_tracing
2855
+ ~attributes: [(" xapi.event.on.vm" , fst id); (" xapi.event.on.vusb" , snd id)]
2856
+ ~__context __FUNCTION__
2857
+ in
2834
2858
try
2835
2859
if Events_from_xenopsd. are_suppressed (fst id) then
2836
2860
debug " xenopsd event: ignoring event for VUSB (VM %s migrating away)"
@@ -2896,7 +2920,11 @@ let unregister_task __context queue_name id =
2896
2920
id
2897
2921
2898
2922
let update_task ~__context queue_name id =
2899
- let @ __context = Context. with_tracing ~__context __FUNCTION__ in
2923
+ let @ __context =
2924
+ Context. with_tracing
2925
+ ~attributes: [(" xapi.event.on.task" , id)]
2926
+ ~__context __FUNCTION__
2927
+ in
2900
2928
try
2901
2929
let self = TaskHelper. id_to_task_exn (TaskHelper. Xenops (queue_name, id)) in
2902
2930
(* throws Not_found *)
0 commit comments