Skip to content

rework spanid (breaking change)#16

Open
Fishrock123 wants to merge 3 commits intoinanna-malick:masterfrom
Fishrock123:rework-spanid
Open

rework spanid (breaking change)#16
Fishrock123 wants to merge 3 commits intoinanna-malick:masterfrom
Fishrock123:rework-spanid

Conversation

@Fishrock123
Copy link
Contributor

@Fishrock123 Fishrock123 commented Feb 17, 2021

Instance ids appear unnecessary. Any span must already be associated with a trace, which has 128 bits (a very large space to avoid collisions). Given a span ids must only be unique in a given trace, 64 bits alone should be plenty. Also, honeycomb doesn't have any special way to represent full parallelism, the full span ids must be different anyways.

This also changes the SpanId formatting to be hex by default. The parser has been updated to also parse in hex.


This fixes a critical issue interpreting parent spans from other honeycomb providers (such as beeline-nodejs).

Builds on #15

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.
Instance ids appear unnecessary. Any span must already be associated with a trace, which has 128 bits (a very large space to avoid collisions). Given a span ids must only be unique in a given trace, 64 bits alone should be plenty. Also, honeycomb doesn't have any special way to represent full parallelism, the full span ids must be different anyways.

This also changes the SpanId formatting to be hex by default. The parser has also been update to parse in hex.
@Fishrock123
Copy link
Contributor Author

As noted in eaze/tracing-honeycomb#2, I cannot see CI, and so I have no idea what is failing here. I've already tested everything locally, and the same PR against my employer's fork with updated CI passes: eaze/tracing-honeycomb#2

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