-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add opentelemetry tracing support #39
Conversation
Any idea on the overhead this introduces? It doesn't look like it would be a lot, but we may want to have this set up so it can be enabled when needed and disabled in general. |
I think it is minimal, any tfhe or network operation will be much slower than tracing. At least in the beginning of the project I believe it is critical we have a good tracing of which ciphertexts are slowly executed so it would be easier to troubleshoot issues. As for the implementation, all traces are tracked in memory and flushed in the background by batches, it shouldn't be noticeable or disruptive to our application in any way. In production enabling traces post factum when something happened is already too late, it is standard practice to have that information beforehand. |
dc6c95e
to
fdb469c
Compare
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.
Nice!
Added some minor comments that can be handled separately.
if let Err(err) = tracing::setup_tracing() { | ||
panic!("Error while initializing tracing: {:?}", err); | ||
} |
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.
Nit: to avoid if statements, we could make main() return a Result and use ?
.
@@ -390,7 +390,8 @@ impl SupportedFheCiphertexts { | |||
SupportedFheCiphertexts::FheBytes128(_) => 10, | |||
SupportedFheCiphertexts::FheBytes256(_) => 11, | |||
SupportedFheCiphertexts::Scalar(_) => { | |||
panic!("we should never need to serialize scalar") | |||
// need this for tracing as we join types of computation for a trace | |||
200 |
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.
Maybe we can define a constant somewhere to say that 200 or some bigger number is "invalid"?
Adds opentelemetry tracing for fhe backend worker, we can see every work item processed with operation, input types, output type and output handle
@dartdart26 @antoniupop