Lambda
25353da8b8
sending.rs: record handler errors using Display
2024-05-29 20:42:46 +00:00
Lambda
fb52ded222
sending.rs: try to preserve requester spans
...
Add a `follows_from` relationship to the dispatched worker's span
pointing to the caller of `send_*()`, if known.
2024-05-29 20:42:46 +00:00
Lambda
18992b4d1d
sending.rs: rename OutgoingKind to Destination
...
That's what it is. It describes the destination of the event.
2024-05-29 20:42:45 +00:00
Lambda
9071e11e06
sending.rs: move handler functions out of service
...
These don't take `self`, no reason for them to be associated functions.
2024-05-29 20:42:14 +00:00
Lambda
13f79dfee1
sending.rs: factor out event handlers into separate functions
...
This allows for much nicer control flow, since they don't need to return
Result<OutgoingKind, (OutgoingKind, Error)>.
2024-05-29 20:42:14 +00:00
Lambda
5caafdec06
sending.rs: formatting
2024-05-29 20:42:14 +00:00
Lambda
aa69b7d15c
sending.rs: rename handle_futures->handle_response
...
The future is already done when this is called.
2024-05-29 20:42:14 +00:00
Lambda
9961f1465f
sending.rs: add RequestData to replace big tuple
2024-05-29 20:42:14 +00:00
Lambda
e294543ddb
sending.rs: add RequestKey
...
Much easier to reason about than with a bunch of Vec<u8> everywhere.
2024-05-29 20:42:13 +00:00
Charles Hall
eaeb7620d9
enable multiple_bound_locations lint
2024-05-26 19:47:00 -07:00
Charles Hall
d7e945f4c5
enable dead_code lint
2024-05-26 19:46:48 -07:00
Lambda
5172f66c1a
More useful tracing spans
2024-05-20 16:49:45 +00:00
Lambda
ac42e0bfff
Fix spans in tokio::spawn-ed tasks
...
tokio::spawn is a span boundary, the spawned future has no parent span.
For short futures, we simply inherit the current span with
`.in_current_span()`.
For long running futures containing a sleeping infinite loop, we don't
actually want a span on the entire task or even the entire loop body,
both would result in very long spans. Instead, we put the outermost span
(created using #[tracing::instrument] or .instrument()) around the
actual work happening after the sleep, which results in a new root span
being created after every sleep.
2024-05-20 16:49:40 +00:00
Lambda
5e9e5b76bc
service/sending: factor out closures into methods
2024-05-20 16:49:40 +00:00
Charles Hall
0afc1d2f50
change rustfmt configuration
...
This change is fully automated, except the `rustfmt.toml` changes and
a few clippy directives to allow specific functions with too many lines
because they are longer now.
2024-05-16 19:11:40 -07:00
Charles Hall
6bc17b268c
factor select bodies into closures
...
I would've preferred to factor these out into their own functions, but
unfortunately the inner type of the `FuturesUnordered` is unnameable.
`Box` or TAIT would help, but the former has a performance cost and the
latter doesn't exist on stable yet.
2024-05-16 19:09:57 -07:00
Charles Hall
1911ad34d9
stop putting comments and code on the same line
2024-05-16 15:22:35 -07:00
Charles Hall
75358340bb
enable single_match_else lint
...
Also collapses some if statements in the federation name resolution code
2024-05-14 20:01:24 -07:00
Charles Hall
db4951c5fd
enable semicolon_if_nothing_returned lint
2024-05-14 20:01:24 -07:00
Charles Hall
96e1877639
enable redundant_closure_for_method_calls lint
2024-05-14 20:01:24 -07:00
Charles Hall
224ba65d06
enable map_unwrap_or lint
2024-05-14 20:01:24 -07:00
Charles Hall
9606f59141
enable manual_let_else lint
2024-05-14 20:01:23 -07:00
Charles Hall
ebae8ceeb0
enable implicit_clone lint
2024-05-14 19:59:43 -07:00
Charles Hall
623824dc0c
enable if_not_else lint
2024-05-14 19:59:40 -07:00
Charles Hall
71c48f66c4
enable as_conversions lint
...
There were some very, uh, creative (and inconsistent) ways to convert
between numeric types in here...
2024-05-12 18:51:26 -07:00
Charles Hall
d748544f0e
enable unreachable_pub lint
...
This causes some other lints to start firing too (which is good), but
I'm going to fix them in follow-up commits to keep things organized.
2024-05-12 18:51:26 -07:00
Charles Hall
a626e7b0f0
enable mod_module_files lint
2024-05-12 18:51:26 -07:00