Closed fatih-acar closed 2 months ago
I like the idea of having our own counter but not sure if this implementation is gonna work. As far as I understand, on a Gunicorn server, all workers will have their own counter with overlapping value Could we use a UUID instead ?
You're right, it's actually broken and actually the counter resets most of the time due to transactions creating a new InfrahubDatabase class instance... I initially wanted to retrieve the internal neo4j query id but couldn't figure out how. I thought about generating uuids but it seemed heavy to do so at each query.
I will rather use the tracing span id instead (since it's only useful when tracing is enabled), I think it's the best of both worlds.
I will rather use the tracing span id instead (since it's only useful when tracing is enabled), I think it's the best of both worlds.
Agreed, I was thinking the same
This will allow us to better track query executions.
Adding metadata to queries makes neo4j print the following query logs (metadata is printed at the end of the log):