How to get detailed information about light paths with Path tracer

Hello. I’d like to know if there’s a way to get detailed information about light paths when using the path tracer for rendering.

I think it’s best that I describe the information with an example of an output that I’d like to achieve:
PixelCoordinates: 500,500
SampleNumber: 2
RayBounces: 3
Hitpoints: (100, 200, 150), (x, y, z), (x, y, z) → (coordinates of each hit)
MetallicValues: 1, 1, 0 → (values on each hitpoint)
RoughnessValues: 0.2, 0.1, 0.3 → (values on each hitpoint)

Basically, I’d like to get information like this for every path that’s created when using path tracing.

Of course I’d make it more compact and possibly write to a buffer file and handle the interpretation later on, possibly with a separate script.

I tried looking through the files under “Engine/Shaders/Private/PathTracer”, it seems that the information I’m looking for is there, especially in “PathTracingCore.ush” in the “PathTracingKernel” function, line 1397.

Should I somehow modify this shader file in a way that it also logs this data somewhere? Is that even something that’s okay to do? Is there some other solution which I’m not seeing here? Any help is appreciated, thanks!