Repository: appsmithorg/appsmith
File: app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java (Java)

Code before:
    @Override
    public Mono<ActionExecutionResult> executeAction(
            Flux<Part> partFlux, String environmentId, HttpHeaders httpHeaders, Boolean operateWithoutPermission) {
        ExecuteActionMetaDTO executeActionMetaDTO = ExecuteActionMetaDTO.builder()
                .headers(httpHeaders)
                .operateWithoutPermission(operateWithoutPermission)
                .environmentId(environmentId)
                .build();
        Mono<ExecuteActionDTO> executeActionDTOMono =
                createExecuteActionDTO(partFlux).cache();
        Mono<Plugin> pluginMono = executeActionDTOMono.flatMap(executeActionDTO -> newActionService
                .findById(executeActionDTO.getActionId())
                .switchIfEmpty(Mono.error(new AppsmithException(AppsmithError.INVALID_ACTION)))
                .flatMap(newAction -> {
                    if (newAction.getPluginId() == null
                            || newAction.getPluginId().isEmpty()) {
                        return Mono.empty();
                    } else {
                        return pluginService.findById(newAction.getPluginId()).switchIfEmpty(Mono.empty());
                    }
                })
                .cache());

        return pluginMono
                .flatMap(plugin -> {
                    String pluginName = plugin.getName() != null ? plugin.getName() : NONE;
                    executeActionMetaDTO.setPlugin(plugin);
                    return executeActionDTOMono
                            .flatMap(executeActionDTO ->
                                    populateAndExecuteAction(executeActionDTO, executeActionMetaDTO))
                            .tag("plugin", pluginName) // Use plugin name here
                            .name(ACTION_EXECUTION_SERVER_EXECUTION)
                            .tap(Micrometer.observation(observationRegistry));
                })
                .switchIfEmpty(Mono.defer(() -> {
                    // If pluginMono is empty, set plugin to null in executeActionMetaDTO
                    executeActionMetaDTO.setPlugin(null);
                    return executeActionDTOMono
                            .flatMap(executeActionDTO ->
                                    populateAndExecuteAction(executeActionDTO, executeActionMetaDTO))
                            .tag("plugin", NONE)
                            .name(ACTION_EXECUTION_SERVER_EXECUTION)
                            .tap(Micrometer.observation(observationRegistry));
                }));
    }

    /**
     * Fetches the required Mono (action, datasource, and plugin) and makes actionExecution call to plugin
     *
     * @param executeActionDTO
     * @param executeActionMetaDTO

Review comment (suggestion):
@ApekshaBhosale NONE is not a standard convention for representing missing values.
Can you instead use any string value here, maybe `PLUGIN_NOT_AVAILABLE` or anything else to indicate the metrics for this.

Code after:
    @Override
    public Mono<ActionExecutionResult> executeAction(
            Flux<Part> partFlux, String environmentId, HttpHeaders httpHeaders, Boolean operateWithoutPermission) {
        ExecuteActionMetaDTO executeActionMetaDTO = ExecuteActionMetaDTO.builder()
                .headers(httpHeaders)
                .operateWithoutPermission(operateWithoutPermission)
                .environmentId(environmentId)
                .build();
        Mono<ExecuteActionDTO> executeActionDTOMono =
                createExecuteActionDTO(partFlux).cache();
        Mono<Plugin> pluginMono = executeActionDTOMono.flatMap(executeActionDTO -> newActionService
                .findById(executeActionDTO.getActionId())
                .flatMap(newAction -> {
                    if (newAction.getPluginId() == null
                            || newAction.getPluginId().isEmpty()) {
                        return Mono.empty();
                    } else {
                        return pluginService.findById(newAction.getPluginId());
                    }
                })
                .cache());

        return pluginMono
                .map(plugin -> {
                    executeActionMetaDTO.setPlugin(plugin);
                    return plugin.getName() != null ? plugin.getName() : NONE;
                })
                .defaultIfEmpty(NONE)
                .flatMap(pluginName -> {
                    String name = (String) pluginName;
                    if (NONE.equals(name)) {
                        executeActionMetaDTO.setPlugin(null);
                    }
                    return executeActionDTOMono
                            .flatMap(executeActionDTO ->
                                    populateAndExecuteAction(executeActionDTO, executeActionMetaDTO))
                            .tag("plugin", name)
                            .name(ACTION_EXECUTION_SERVER_EXECUTION)
                            .tap(Micrometer.observation(observationRegistry));
                });
    }

    /**
     * Fetches the required Mono (action, datasource, and plugin) and makes actionExecution call to plugin
     *
     * @param executeActionDTO
     * @param executeActionMetaDTO
     * @return actionExecutionResult if query succeeds, error messages otherwise
     */
    @Override
    public Mono<ActionExecutionResult> executeAction(