-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds ExtraFieldPropagation.Customizer to implement secondary sampling
Currently, we have a test `SecondarySampling` which is complex to implement as it assumes conditional decisions will result in use of different reporting libraries. Ex normal zipkin for sampled data, and a different format for secondary sinks. After a chat with Nara, we realized that data routing logic is cheapest to address outside the process. In other words, if a secondary sampling decision says "record" but only for a part of the network, this data for that subtree will still end up posting to the same place. With this in mind, secondary sampling can be far simpler, driven mainly by decisions made on "extra fields". This change adds two things to allow this to happen. * `ExtraFieldPropagation.Customizer` which allows you to set a secondary decision (ex via sampledLocal) * `Tracing.Builder.alwaysReportSpans()` which allows the normal span reporter to get everything recorded. This PR neetds a little more work as the `SecondarySampling` test needs to be redone to prove it makes things simpler. Fixes #955
- Loading branch information
Adrian Cole
committed
Aug 11, 2019
1 parent
4e6beda
commit bf41390
Showing
10 changed files
with
404 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.