We can currently only implement a Sampler by calling SamplingResult.create. For results without attributes, we do return singletons from this method so it doesn't have any real overhead. But it's somewhat annoying to have to call create with a parameter and not so intuitive - every time I do it I still ctrl-click through the method to confirm it's not creating a new object. The alternative of creating a private static final in the Sampler seems redundant vs us providing some factories
SamplingResult.recordAndSample()
SamplingResult.recordOnly()
SamplingResult.drop()
We can currently only implement a Sampler by calling
SamplingResult.create. For results without attributes, we do return singletons from this method so it doesn't have any real overhead. But it's somewhat annoying to have to callcreatewith a parameter and not so intuitive - every time I do it I still ctrl-click through the method to confirm it's not creating a new object. The alternative of creating aprivate static finalin the Sampler seems redundant vs us providing some factoriesSamplingResult.recordAndSample()SamplingResult.recordOnly()SamplingResult.drop()