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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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(
|
||||
NewAction action,
|
||||
ActionDTO actionDTO,
|
||||
|
|
@ -1025,14 +1034,9 @@ public class NewActionServiceCEImpl extends BaseService<NewActionRepository, New
|
|||
ActionExecutionResult actionExecutionResult,
|
||||
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 (!analyticsService.isActive()) {
|
||||
// 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());
|
||||
|
||||
if (!isSendExecuteAnalyticsEvent()) {
|
||||
return Mono.empty();
|
||||
}
|
||||
ActionExecutionRequest actionExecutionRequest = actionExecutionResult.getRequest();
|
||||
ActionExecutionRequest request;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user