Rework tracing, bump deps, turn disk cache on #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When dealing with various installs, I found out that my context propagation was messy. This is unsurprising because I was just sending literal internal context values from OTel without converting them nor exporting them, so when two ReVault instances had different OTel internals, context got lost.
This replaces things by making the context propagation explicit with the adequate serialization functions.
All of these are wrapped into new shared calls (in
revault_otel
, but could move to another internal app at some point) that essentially make things work the waywith_span(...)
works in the OTel lib, excepts split up between?start_active_span/1-2
and?end_active_span/0
and uses the pdict to maintain the context stack required. Additionally, the functions to extract the trace state to send it across services is used everywhere, even inside services to keep things portable and modifiable.While at it, I've added TLS-specific traces for the client and server, and moved these to their own hierarchy outside of the connection span and into the higher session-level stuff such that the traces are more readable.
Also: