Skip to content

Commit

Permalink
Rename includeStandaloneTelemetry (#2481)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask authored Aug 30, 2022
1 parent 12da3c1 commit b956164
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ public static class SamplingOverride {

// TODO (trask) add test for this
// this is primarily useful for batch jobs
public boolean includeStandaloneTelemetry;
public boolean includingStandaloneTelemetry;

// not using include/exclude, because you can still get exclude with this by adding a second
// (exclude) override above it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ public Double getOverridePercentage(boolean isStandaloneTelemetry, Attributes at
}

private static class MatcherGroup {
private final boolean includeStandaloneTelemetry;
private final boolean includingStandaloneTelemetry;
private final List<TempPredicate> predicates;
private final Sampler sampler;
private final SamplingPercentage samplingPercentage;

private MatcherGroup(SamplingOverride override) {
includeStandaloneTelemetry = override.includeStandaloneTelemetry;
includingStandaloneTelemetry = override.includingStandaloneTelemetry;
predicates = new ArrayList<>();
for (SamplingOverrideAttribute attribute : override.attributes) {
predicates.add(toPredicate(attribute));
Expand All @@ -94,7 +94,7 @@ Sampler getSampler() {

private boolean matches(
boolean isStandaloneTelemetry, Attributes attributes, @Nullable LazyHttpUrl lazyHttpUrl) {
if (isStandaloneTelemetry && !this.includeStandaloneTelemetry) {
if (isStandaloneTelemetry && !includingStandaloneTelemetry) {
return false;
}
for (TempPredicate predicate : predicates) {
Expand Down

0 comments on commit b956164

Please sign in to comment.