Switch to tracing for logging #6
Labels
No labels
bug
duplicate
enhancement
help wanted
infeasible
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
renovate-bot
renovate-security
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Total time spent: 3 hours 35 minutes
Due date
realaravinth
3 hours 35 minutes
No due date set.
Dependencies
No dependencies set.
Reference: LibrePages/librepages#6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
tracing
is a structured logging library that works well with async Rust. Since LibrePages system uses multiple, small components, having structured, traceable logging will ease debugging.I'm new to tracing, and observability in general. So implementing this will require research.
References
tracing-actix-web
READMEhoneycomb.io
's observability guideTracing separates processing logs from instrumentation1.
For now, we are only going to "instrument" Librepages and come back to processing backends later. Jager is a FOSS distributed tracing backend that implements OpenTelemetry Protocol. Looks nice, but requires research.
Processing backends are relevant only for large deployments, so they should be gated behind feature flags/configuration options. They should be disabled by default, favoring small deployments.
Instrumentation is the process of adding code to your application so you can understand its inner state. Instrumented applications measure what code is doing when it responds to active requests by collecting data such as metrics, events, logs, and traces (MELT). In contrast to an application that isn’t instrumented and only uses point-in-time logs, an instrumented application tracks as much information as possible about the service’s operations and behavior. It provides more detail about what is happening, so you can see relationships between requests. Source ↩︎
Changes live in
wip-tracing
branch.Diff:
58bb606879..3a961bc524
Summary:
log
crate usage across the codebase to usingtracing
crateMerged into
wip-dashboard
.