Skip to content

Commit

Permalink
reword reword term backgroundTaskReporting to subprocessInstrumentation
Browse files Browse the repository at this point in the history
Signed-off-by: reza stallone <[email protected]>
  • Loading branch information
rezastallone committed Oct 17, 2023
1 parent 0b90a1d commit fc5dd8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static SplunkRum initialize(
return INSTANCE;
}

if (builder.isSubprocessInstrumentationDisabled() && builder.isBackgroundProcess) {
if (builder.isSubprocessInstrumentationDisabled() && builder.isSubprocess) {
INSTANCE = SplunkRum.noop();
} else {
INSTANCE =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public final class SplunkRumBuilder {
int maxUsageMegabytes = DEFAULT_MAX_STORAGE_USE_MB;
boolean sessionBasedSamplerEnabled = false;
double sessionBasedSamplerRatio = 1.0;
boolean isBackgroundProcess = false;
boolean isSubprocess = false;

/**
* Sets the application name that will be used to identify your application in the Splunk RUM
Expand Down Expand Up @@ -324,7 +324,7 @@ public SplunkRum build(Application application) {
* @return {@code this}
*/
public SplunkRumBuilder disableSubprocessInstrumentation(String applicationId) {
isBackgroundProcess = BackgroundProcessDetector.isBackgroundProcess(applicationId);
isSubprocess = SubprocessDetector.isSubprocess(applicationId);
configFlags.disableSubprocessInstrumentation();
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import java.lang.reflect.Method;
import java.util.Objects;

final class BackgroundProcessDetector {
final class SubprocessDetector {

private BackgroundProcessDetector() {}
private SubprocessDetector() {}

static Boolean isBackgroundProcess(String applicationId) {
static Boolean isSubprocess(String applicationId) {
String applicationProcessName = getApplicationProcessName();
// If application Id is same as application processName, the app is visible to user.
// Using inverted condition to determine background processes.
Expand Down

0 comments on commit fc5dd8e

Please sign in to comment.