-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instrument task related functionality #5735
Instrument task related functionality #5735
Conversation
Pedantically, I'd prefer we worked towards avoiding infix usage of We can use |
I don't have strong opinions on |
I quite like the visual of As far as I am aware |
e9b44fa
to
c3c5346
Compare
Looks good to me, but might need another eye from some one who's familiar with tracing as it is a relatively large change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, although we should test that exceptions from the tracing module don't cause failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, can you squash the fixups into their respective commits (a git rebase should do that).
Use `finally` to execute `complete_tracing` on the context when we are done and not at the beginning. This allows for instrumentation and correct trace display of functions such as `assert_op_valid`. Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
Update `with_tracing` to record the error and finish the span if the instrumented function fails. Add `session.track.id` and `task.id` attributes to all spans inside a trace that is following a task. This will result in spans being finished even if the function has raised an exception. Plus, better debuggability in the case that something fails. Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
Instruments task relatated functions. This will allow for better debuggablity and understanding of issues related with tasks. Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
`Date.now` is preffered for synchronisation between host as it uses `ptime`. Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
Uses `let@` and `match` statements to avoid nesting. This should increase code readability. Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
7e819a2
to
d496db1
Compare
Instruments task related functions.
Some other improvements:
Context.with_tracing
now records the error inside the span;Context.complete_tracing
is now called withfinally
.