chore: Changes in action execution analytics event (#17021)
This commit is contained in:
parent
4e9068ddba
commit
c72b8eae2a
|
|
@ -1017,6 +1017,15 @@ public class NewActionServiceCEImpl extends BaseService<NewActionRepository, New
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Since we're loading the application and other details from DB *only* for analytics, we check if analytics is
|
||||||
|
* active before making the call to DB.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Boolean isSendExecuteAnalyticsEvent() {
|
||||||
|
return analyticsService.isActive();
|
||||||
|
}
|
||||||
|
|
||||||
private Mono<ActionExecutionRequest> sendExecuteAnalyticsEvent(
|
private Mono<ActionExecutionRequest> sendExecuteAnalyticsEvent(
|
||||||
NewAction action,
|
NewAction action,
|
||||||
ActionDTO actionDTO,
|
ActionDTO actionDTO,
|
||||||
|
|
@ -1025,14 +1034,9 @@ public class NewActionServiceCEImpl extends BaseService<NewActionRepository, New
|
||||||
ActionExecutionResult actionExecutionResult,
|
ActionExecutionResult actionExecutionResult,
|
||||||
Long timeElapsed
|
Long timeElapsed
|
||||||
) {
|
) {
|
||||||
// Since we're loading the application from DB *only* for analytics, we check if analytics is
|
|
||||||
// active before making the call to DB.
|
if (!isSendExecuteAnalyticsEvent()) {
|
||||||
if (!analyticsService.isActive()) {
|
return Mono.empty();
|
||||||
// This is to have consistency in how the AnalyticsService is being called.
|
|
||||||
// Even though sendObjectEvent is triggered, AnalyticsService would still reject this and prevent the event
|
|
||||||
// from being sent to analytics provider if telemetry is disabled.
|
|
||||||
return analyticsService.sendObjectEvent(AnalyticsEvents.EXECUTE_ACTION, action)
|
|
||||||
.then(Mono.empty());
|
|
||||||
}
|
}
|
||||||
ActionExecutionRequest actionExecutionRequest = actionExecutionResult.getRequest();
|
ActionExecutionRequest actionExecutionRequest = actionExecutionResult.getRequest();
|
||||||
ActionExecutionRequest request;
|
ActionExecutionRequest request;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user