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

move ID rewriting to the client side #240

Closed
hawkw opened this issue Dec 21, 2021 · 0 comments · Fixed by #244
Closed

move ID rewriting to the client side #240

hawkw opened this issue Dec 21, 2021 · 0 comments · Fixed by #244
Labels
C-console Crate: console. C-subscriber Crate: console-subscriber.

Comments

@hawkw
Copy link
Member

hawkw commented Dec 21, 2021

Currently, console-subscriber contains a bunch of machinery for rewriting non-sequential span::Ids from tracing to sequential IDs (see #75). Upon thinking about this for a bit, I don't actually understand why this has to be done on the instrumentation-side. This seems like extra work that's currently done in the instrumented application, when it really doesn't have to be.

Instead, the client should be responsible for rewriting tracing IDs to pretty, sequential user-facing IDs. This would have a few advantages:

@hawkw hawkw added C-console Crate: console. C-subscriber Crate: console-subscriber. labels Dec 21, 2021
hawkw added a commit that referenced this issue Dec 28, 2021
Currently, `console-subscriber` contains a bunch of machinery for
rewriting non-sequential `span::Id`s from `tracing` to sequential IDs
(see #75). Upon thinking about this for a bit, I don't actually
understand why this has to be done on the instrumentation-side. This
seems like extra work that's currently done in the instrumented
application, when it really doesn't have to be.

Instead, the client should be responsible for rewriting `tracing` IDs to
pretty, sequential user-facing IDs. This would have a few advantages:
- it moves some work out of the application, which is always good
- if data is being emitted through an implementation other than
  `console-subscriber`, we will *still* get nicely ordered ids
- this also makes some of the stuff i'm working on in #238 easier

This branch removes ID rewriting from `console-subscriber`, and adds it
to the `console` CLI's `state` module.

Closes #240

Signed-off-by: Eliza Weisman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-console Crate: console. C-subscriber Crate: console-subscriber.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant