feat(coprocessor): standardize OTLP init + shutdown guard#1942
feat(coprocessor): standardize OTLP init + shutdown guard#1942mergify[bot] merged 22 commits intomainfrom
Conversation
|
@claude /pr-review |
|
Claude finished @Eikix's task in 1m 17s —— View job PR Review: feat(coprocessor): standardize OTLP init + shutdown guard
Question: Is a Drop Guard Good Practice or Outdated?Short answer: Drop guards are absolutely still good practice in Rust, especially for your use case. Why Drop Guards are the Right Choice Here
When Drop Guards Might Be "Outdated"The only scenario where drop guards are considered problematic is in async contexts where the destructor needs to perform async work. In your case, PR Review Summary✅ What's Good
💡 Suggestions (Non-Blocking)1. Consider Adding Timeout to Shutdown
The shutdown could potentially hang if the OTLP collector is unresponsive. Consider wrapping with a timeout: fn shutdown_once(&mut self) {
if let Some(provider) = self.provider.take() {
// Consider: timeout around shutdown to prevent hanging on exit
if let Err(err) = provider.shutdown() {
warn!(error = %err, "Failed to shutdown OTLP tracer provider");
}
}
}2. Document Why
|
🧪 CI InsightsHere's what we observed from your CI run for 60f4a1f. 🟢 All jobs passed!But CI Insights is watching 👀 |
|
@claude /pr-review |
|
Claude finished @Eikix's task in 5m 47s —— View job PR Review: feat(coprocessor): standardize OTLP init + shutdown guard
SummaryThis PR successfully standardizes OTLP initialization across the coprocessor binaries with a clean Verdict: ✅ Ready to merge with one minor consistency fix suggested below. What's Good
Issues Found🟡 Minor: Inconsistent Log Level for OTLP FailureConfidence: 95% File: The poller uses // poller/mod.rs:96 - uses warn!
warn!(error = %err, "Failed to setup OTLP");
// All other services use error!
error!(error = %err, "Failed to setup OTLP");Impact: Operators monitoring for ERROR-level logs may miss OTLP failures in the poller service. Since OTLP failure means no distributed tracing, this should be treated consistently across all services. NotesDrop Guard Pattern - Answering the Original QuestionQ: Is a drop guard good practice or outdated? A: Drop guards are absolutely still good practice, especially for this use case:
The only scenario where drop guards are problematic is for async cleanup, but |
|
@mergify queue |
Merge Queue StatusRule:
This pull request spent 2 hours 37 minutes 15 seconds in the queue, including 1 hour 35 minutes 58 seconds running CI. Required conditions to merge
|
Summary
fhevm-engine-common::telemetrysns-workersubscriber + optional OTEL layer wiring in common telemetryValidation
cargo fmt,cargo check,clippy)SQLX_OFFLINE=true cargo check -p fhevm-engine-common -p sns-worker -p gw-listener -p host-listener -p tfhe-worker -p transaction-sender -p zkproof-workerfhevm-engine-commonScope
Closes https://github.com/zama-ai/fhevm-internal/issues/1006