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

feat: rework TraceId for honeycomb (breaking change) #9

Closed
wants to merge 1 commit into from

Conversation

Fishrock123
Copy link
Contributor

Now can be any opaque string as specified by Honeycomb but will be generated as a UUID V4 and also prefer to be stored as a UUID.

Adds many ways of converting to and from TraceId.

This is a breaking change because format!("{}", trace_id) now returns a more compressed string encoding of a u128 if you use TraceId::generate().

@Fishrock123
Copy link
Contributor Author

Fishrock123 commented Jan 4, 2021

Here is an example of the kinds of issues which arise with the current API - double parsing to and from intermediate values including strings ... 😬

https://github.com/eaze/preroll/blob/d2c7f51e9e97a102a34ed20c1e6f1872eea51ee1/src/middleware/trace.rs#L55-L56

Now can be any opaque string as specified by Honeycomb but will be generated as a UUID V4 and also prefer to be stored as a UUID.

Adds many ways of converting to and from `TraceId`.
@Fishrock123
Copy link
Contributor Author

This has conflicts because #7 never considered that Trace IDs may not be able to be a u128.

@Fishrock123
Copy link
Contributor Author

Also, the lack of this is causing my team bugs in our services because this library disregards honeycomb's insistence that id's can be anything. Refs: eaze/preroll#18

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