From b956164ea7d6d5a39f2245daa2e11abc7b47e0df Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 30 Aug 2022 10:36:07 -0700 Subject: [PATCH] Rename includeStandaloneTelemetry (#2481) --- .../agent/internal/configuration/Configuration.java | 2 +- .../agent/internal/sampling/SamplingOverrides.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/configuration/Configuration.java b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/configuration/Configuration.java index 53cefbfabbf..de2d35c0d0d 100644 --- a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/configuration/Configuration.java +++ b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/configuration/Configuration.java @@ -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 diff --git a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/sampling/SamplingOverrides.java b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/sampling/SamplingOverrides.java index 2ce155d3965..ef0c8b5a9ad 100644 --- a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/sampling/SamplingOverrides.java +++ b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/sampling/SamplingOverrides.java @@ -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 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)); @@ -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) {