NH-11236 sampler creates Service Entry Internal KVs#12
Conversation
cheempz
left a comment
There was a problem hiding this comment.
LGTM, thanks @tammy-baylis-swi! I think this is ready w/o further SampleSource testing since that's all implemented by liboboe. In fact the test results you provided has helped highlight a bug in liboboe -- the returned SampleSource and SampleRate should be -1 for trigger traces per spec, but liboboe is setting to 0. I'll submit a PR to get that fixed :)
|
Hi @cheempz ! Based on our separate chat, in 23a12a2 I've updated the Sampler's I wasn't sure if the identification of a continued decision should be based on all four liboboe outputs. Currently, if even one is not Please let me know your thoughts! In the meantime I'll try to resolve the merge conflicts. I made some commits to the big PR this morning which ended up refactoring |
cheempz
left a comment
There was a problem hiding this comment.
LGTM, thanks @tammy-baylis-swi! Theoretically if sample rate and bucket rate are -1 it would indicate a continued decision, but I think checking all four decision values is the most correct and accessing two more dictionary shouldn't cost that much ;)
Here the custom Sampler creates Service Entry Internal KVs by setting them as attributes only for the root span:
I've also tidied the
calculate_attributesa little bit to avoid ambiguity in new attributes assignment.I've done some manual testing, with resulting exported traces with those KVs recorded on this doc: https://swicloud.atlassian.net/wiki/spaces/NIT/pages/2893414559/2022-04-13+service+entry+internal+KVs+testing It doesn't really cover the different
SampleSourceresults possible though. Would that be liboboe scope or in this PR's scope?This PR is to merge into
add-custom-propagatorbranch at the moment because this one hasn't been merged yet #11 But I can change the destination if this one needs lots of work too! Please let me know and/or if I need to do more testing.