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

Fixes bad parse of parent w/o sampling and backfills logging tests #816

Merged
merged 3 commits into from
Oct 24, 2018

Conversation

codefromthecrypt
Copy link
Member

@codefromthecrypt codefromthecrypt commented Oct 24, 2018

One case failed to parse, which is not-yet-sampled header that includes
a parent ID. This is malpractice, but shouldn't fail to parse. This
fixes it.

This also corrects the log statements for some things and tests them.

Coming out of envoyproxy/envoy#4712 (comment)

@zyfjeff noticed our logs were misleading on incorrect data like putting an exclamation point where a hyphen should be. I was lazy and didn't assert on logs.. now .. yeah will do that :P

Thanks to @zyfjeff cc @shakuzen

@codefromthecrypt
Copy link
Member Author

this fails while I backfill all the things.. raised early as wanted to show how to do this

One case failed to parse, which is not-yet-sampled header that includes
a parent ID. This is malpractice, but shouldn't fail to parse. This
fixes it.

This also corrects the log statements for some things and tests them.
@codefromthecrypt codefromthecrypt changed the title WIP: Adds verification of logs on b3 single fail Fixes bad parse of parent w/o sampling and backfills logging tests Oct 24, 2018
@codefromthecrypt
Copy link
Member Author

ok done.. interestingly we did miss one case here, too

@codefromthecrypt
Copy link
Member Author

cc @drolando @sfackler @fedj @dpsoft again.. just in case you copy/pasta'd an error

@drolando
Copy link

@adriancole I don't really understand what not-yet-sampled header or your example mean.
Is a b3 header containing {x-b3-traceid}-{x-b3-spanid}-{x-b3-parentspanid} (missing sampled flag) valid?

@codefromthecrypt
Copy link
Member Author

codefromthecrypt commented Oct 24, 2018 via email

@codefromthecrypt
Copy link
Member Author

I am not extremely creative, but one possibility for parent ID w/o sampled yet is someone doing log based IDs prior to entering zipkin. For example, if you had a few load balancers stacked. Again I don't think this is something tracers should think about.. the change here was more about the logging vs the edge case.

@bplotnick
Copy link

I can't remember specifically. Based on my concern here: openzipkin/b3-propagation#21, I might've been referencing one particular issue we had internally with an incorrect custom implementation (we've had a few such cases of custom internal implementations that have made mistakes by not following the b3 standard exactly). Or i could've just wanted more clarity on an ambiguity.

@codefromthecrypt
Copy link
Member Author

Thanks for piping in @bplotnick FWIW I'm happy to be extra lenient for now. We can make a different change to be un-lenient.. the former code said it addressed this and didn't hence me calling it a bug. the pattern is still questionable at best, and kindof a separate issue I suppose.

@codefromthecrypt codefromthecrypt merged commit dad8e08 into master Oct 24, 2018
@codefromthecrypt codefromthecrypt deleted the b3-single-log-tests branch October 24, 2018 10:27
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.

None yet

3 participants