-
Notifications
You must be signed in to change notification settings - Fork 88
[DRAFT - DO NOT MERGE] Basic OpenTelemetry integration #1201
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
base: main
Are you sure you want to change the base?
Conversation
508eb58 to
76af80a
Compare
c86d59b to
1db15e7
Compare
|
As I've been struggling to make this cleaner I think I have had a realization. I want to be able to trace futures which means I need to use |
Handler panics in HandlerTaskMode::Detached were incorrectly being reported as 499 (Client Closed Request) instead of 500 (Internal Server Error) in telemetry and traces. This occurred because the panic handling code called panic::resume_unwind(), which caused the request handling task to panic and trigger the disconnect guard, leading to incorrect status code assignment. Changes: - Extract panic message from JoinError and convert to HttpError - Return 500 Internal Server Error instead of propagating panic - Add integration test to verify panic handling returns proper 500 status - Preserve existing behavior for HandlerTaskMode::CancelOnDisconnect 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Add an optional "tracing" feature that enables a bridge between the tracing crate and slog, allowing users to use tracing macros while maintaining slog's structured logging and bunyan format output. Key changes: - Add optional tracing dependencies behind "tracing" feature flag - Implement SlogTracingBridge that converts tracing events to slog records - Preserve structured data types (numbers, booleans) in log output - Use proper detection with tracing::dispatcher::has_been_set() - Initialize bridge automatically when feature is enabled - Add comprehensive tests for bridge functionality The bridge maintains backwards compatibility - existing slog usage continues to work unchanged, and tracing is only available when explicitly enabled via the feature flag. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
OpenTelemetry for Dropshot
This is now version 2. It has leaned into the use of
tokio-tracingandopentelemetry-tracing.The
tracingfeature funnels tracing logs out toslogfor unified logging.The
otel-tracingfeature enables shipping traces via OTLP.They can be used together or individually.
Checklist of things that are needed (note that much of it is currently incomplete):
Known Issues
- If a handler panics, currently we get a 499 error span. I don't really like that.See #1359dtrace.conf(24) References
Slides:
https://docs.google.com/presentation/d/1AW_ugVrmkXDTROgPbEt7bCLrLhFo8-z13PoJAdfPO78/
Raw video link:
https://www.youtube.com/watch?v=KQN1t2qlhaw&t=11760s
Screenshot