Skip to content
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

Rework tracing, bump deps, turn disk cache on #44

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

ferd
Copy link
Owner

@ferd ferd commented Oct 1, 2024

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 way with_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:

  • other deps are bumped
  • disk cache is on by default in non-test situations given how much faster it is and lots of personal testing made it feel safer.

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 way `with_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:
- other deps are bumped
- disk cache is on by default in non-test situations given how much
  faster it is and lots of personal testing made it feel safer.
@ferd ferd merged commit bcc0ec8 into main Oct 1, 2024
1 check passed
@ferd ferd deleted the fix-otel-usage-and-others branch October 1, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant