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

change: full rework of TraceId (breaking change) #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Fishrock123
Copy link
Contributor

Honeycomb allows it's trace_id's to be any arbitrary string. Respect that, because we may be sent an id from some source we do not directly control, such as an edge proxy.

This changes TraceId to avoid parsing, and to internally just hold a string. Unfortunately the tracing crate imposes restrictions that make this untenable for span ids.

This also includes a rework of sampling, making it be deterministic for a given trace_id, and also allowing it to function on any string.


Supersedes #9

@inanna-malick

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`.
Honeycomb allows it's trace_id's to be _any arbitrary string_. Respect that, because we may be sent an id from some source we do not directly control, such as an edge proxy.

This changes TraceId to avoid parsing, and to internally just hold a string. Unfortunately the tracing crate imposes restrictions that make this untenable for span ids.

This also includes a rework of sampling, making it be deterministic for a given trace_id, and also allowing it to function on any string.
@Fishrock123
Copy link
Contributor Author

Unfortunately my need for this is production-level, and so I have created a fork for my employer - this is undesirable but we need it to interop with a framework crate published to crates.io and can't use git overrides.
https://github.com/eaze/tracing-honeycomb

Fishrock123 added a commit to eaze/preroll that referenced this pull request Feb 17, 2021
This fixes various issues with tracing-honeycomb.

Refs: inanna-malick/tracing-honeycomb#15
Refs: inanna-malick/tracing-honeycomb#16

This also gets us other unreleased commits, allowing us to do per-trace sampling.
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