chore: Fix Installation complete event not being sent (#20301)
The problem was that the Mono returned by `analyticsService.sendEvent` was returned inside a `.map` call, which, (almost) always results in a bug. This PR fixes that.
This commit is contained in:
parent
9e3867c50f
commit
0845f783d0
|
|
@ -21,6 +21,8 @@ public class ExchangeUtils {
|
|||
contextView.get(ServerWebExchange.class).getRequest().getHeaders().getFirst(HEADER_ANONYMOUS_USER_ID),
|
||||
FieldName.ANONYMOUS_USER
|
||||
))
|
||||
// An error is thrown when the context is not available. We don't want to fail the request in this case.
|
||||
.onErrorResume(error -> Mono.empty())
|
||||
.defaultIfEmpty(FieldName.ANONYMOUS_USER);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ public class UserSignupCEImpl implements UserSignupCE {
|
|||
return Mono.when(
|
||||
userDataService.updateForUser(user, userData),
|
||||
configService.getInstanceId()
|
||||
.map(instanceId -> {
|
||||
.flatMap(instanceId -> {
|
||||
log.debug("Installation setup complete.");
|
||||
analyticsService.identifyInstance(instanceId, userData.getRole(), userData.getUseCase());
|
||||
return analyticsService.sendEvent(
|
||||
|
|
@ -239,7 +239,7 @@ public class UserSignupCEImpl implements UserSignupCE {
|
|||
"goal", ObjectUtils.defaultIfNull(userData.getUseCase(), "")
|
||||
),
|
||||
false
|
||||
).thenReturn(instanceId);
|
||||
);
|
||||
}),
|
||||
envManager.applyChanges(Map.of(
|
||||
APPSMITH_DISABLE_TELEMETRY.name(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user