Page MenuHomePhabricator

[services][backup] PullBackup - fix tracing span
ClosedPublic

Authored by bartek on Jan 11 2023, 3:54 PM.
Tags
None
Referenced Files
F3499003: D6247.diff
Thu, Dec 19, 10:17 PM
Unknown Object (File)
Thu, Dec 12, 8:01 PM
Unknown Object (File)
Thu, Nov 28, 4:31 AM
Unknown Object (File)
Thu, Nov 28, 4:31 AM
Unknown Object (File)
Thu, Nov 28, 4:31 AM
Unknown Object (File)
Thu, Nov 28, 4:31 AM
Unknown Object (File)
Thu, Nov 28, 4:31 AM
Unknown Object (File)
Thu, Nov 28, 4:31 AM
Subscribers

Details

Summary

Logging in async_stream wasn't displaying log spans correctly, this diff fixes that.
I needed to introduce a new dependency tracing-futures (official package from tracing vendor) because the core tracing::Instrumented<T> doesn't implement Stream<T>. With this dependency, we can use <impl Stream>::instrument() and <impl Stream>::in_current_span() which are required to correctly trace streaming logs.

Depends on D6246

Question: Should we display user_id in logs? Or is it sensitive data?

Test Plan

Ran integration tests and ensured logs are displayed correctly

Screenshot 2023-01-11 at 23.46.17.png (534×3 px, 438 KB)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek edited the test plan for this revision. (Show Details)
bartek published this revision for review.Jan 11 2023, 4:02 PM
bartek edited the summary of this revision. (Show Details)

Dependencies look good, but somebody should look at the Rust code, so I'll resign instead of accepting to leave in review state

Question: Should we display user_id in logs? Or is it sensitive data?

Prefer not to do this if possible – it's not as sensitive as other data, but it still creates a log of when users access the backup service, which I'd prefer if we didn't have

your jsi_codegen.yml is different from master, not sure why gate is failing.

This revision is now accepted and ready to land.Jan 13 2023, 12:00 PM