Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ public class OnLoadSpanCE {
public static final String EXECUTABLE_IN_CREATOR_CONTEXT = APPSMITH_SPAN_PREFIX + "executablesInCreatorContext";
public static final String ADD_DIRECTLY_REFERENCED_EXECUTABLES_TO_GRAPH =
APPSMITH_SPAN_PREFIX + "addDirectlyReferencedExecutablesToGraph";
public static final String GET_POSSIBLE_ENTITY_REFERENCES = APPSMITH_SPAN_PREFIX + "getPossibleEntityReferences";
public static final String UPDATE_EXECUTABLE_SELF_REFERENCING_PATHS =
APPSMITH_SPAN_PREFIX + "updateExecutableSelfReferencingPaths";
public static final String GET_POSSIBLE_ENTITY_PARENTS_MAP = APPSMITH_SPAN_PREFIX + "getPossibleEntityParentsMap";
public static final String ADD_EXPLICIT_USER_SET_ON_LOAD_EXECUTABLES_TO_GRAPH =
APPSMITH_SPAN_PREFIX + "addExplicitUserSetOnLoadExecutablesToGraph";
public static final String GET_UNPUBLISHED_ON_LOAD_EXECUTABLES_EXPLICIT_SET_BY_USER_IN_CREATOR_CONTEXT =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
import static com.appsmith.external.constants.spans.OnLoadSpan.ADD_EXPLICIT_USER_SET_ON_LOAD_EXECUTABLES_TO_GRAPH;
import static com.appsmith.external.constants.spans.OnLoadSpan.EXECUTABLE_NAME_TO_EXECUTABLE_MAP;
import static com.appsmith.external.constants.spans.OnLoadSpan.GET_ALL_EXECUTABLES_BY_CREATOR_ID;
import static com.appsmith.external.constants.spans.OnLoadSpan.GET_POSSIBLE_ENTITY_PARENTS_MAP;
import static com.appsmith.external.constants.spans.OnLoadSpan.GET_POSSIBLE_ENTITY_REFERENCES;
import static com.appsmith.external.constants.spans.OnLoadSpan.GET_UNPUBLISHED_ON_LOAD_EXECUTABLES_EXPLICIT_SET_BY_USER_IN_CREATOR_CONTEXT;
import static com.appsmith.external.constants.spans.OnLoadSpan.UPDATE_EXECUTABLE_SELF_REFERENCING_PATHS;
import static com.appsmith.external.helpers.MustacheHelper.EXECUTABLE_ENTITY_REFERENCES;
Expand Down Expand Up @@ -505,9 +503,7 @@ private Mono<List<Set<DslExecutableDTO>>> filterAndTransformSchedulingOrderToDTO
*/
private Mono<Set<EntityDependencyNode>> getPossibleEntityReferences(
Mono<Map<String, Executable>> executableNameToExecutableMapMono, Set<String> bindings, int evalVersion) {
return getPossibleEntityReferences(executableNameToExecutableMapMono, bindings, evalVersion, null)
.name(GET_POSSIBLE_ENTITY_REFERENCES)
.tap(Micrometer.observation(observationRegistry));
return getPossibleEntityReferences(executableNameToExecutableMapMono, bindings, evalVersion, null);
}

/**
Expand All @@ -530,9 +526,7 @@ private Mono<Set<EntityDependencyNode>> getPossibleEntityReferences(
final int entityTypes = EXECUTABLE_ENTITY_REFERENCES | WIDGET_ENTITY_REFERENCES;

return executableNameToExecutableMono
.zipWith(getPossibleEntityParentsMap(bindings, entityTypes, evalVersion)
.name(GET_POSSIBLE_ENTITY_PARENTS_MAP)
.tap(Micrometer.observation(observationRegistry)))
.zipWith(getPossibleEntityParentsMap(bindings, entityTypes, evalVersion))
.map(tuple -> {
Map<String, Executable> executableMap = tuple.getT1();
// For each binding, here we receive a set of possible references to global entities
Expand Down Expand Up @@ -647,8 +641,6 @@ private Mono<Set<ExecutableDependencyEdge>> addDirectlyReferencedExecutablesToGr
bindingsInWidget,
evalVersion,
executableBindingsInDslRef)
.name(GET_POSSIBLE_ENTITY_REFERENCES)
.tap(Micrometer.observation(observationRegistry))
.flatMapMany(Flux::fromIterable)
// Add dependencies of the executables found in the DSL in the graph
// We are ignoring the widget references at this point
Expand Down Expand Up @@ -939,8 +931,6 @@ private Mono<Set<ExecutableDependencyEdge>> recursivelyAddExecutablesAndTheirDep
// First fetch all the executables in the page whose name matches the words found in all the dynamic bindings
Mono<List<EntityDependencyNode>> findAndAddExecutablesInBindingsMono = getPossibleEntityReferences(
executableNameToExecutableMapMono, dynamicBindings, evalVersion)
.name(GET_POSSIBLE_ENTITY_REFERENCES)
.tap(Micrometer.observation(observationRegistry))
.flatMapMany(Flux::fromIterable)
// Add dependencies of the executables found in the DSL in the graph.
.flatMap(possibleEntity -> {
Expand Down Expand Up @@ -1115,8 +1105,6 @@ private Mono<Void> extractAndSetExecutableBindingsInGraphEdges(
executableBindingsMap.get(bindingPath),
evalVersion,
bindingsInDsl)
.name(GET_POSSIBLE_ENTITY_REFERENCES)
.tap(Micrometer.observation(observationRegistry))
.flatMapMany(Flux::fromIterable)
.map(relatedDependencyNode -> {
bindingsFromExecutables.add(relatedDependencyNode.getReferenceString());
Expand Down Expand Up @@ -1147,8 +1135,6 @@ private Mono<Set<ExecutableDependencyEdge>> addWidgetRelationshipToGraph(
return Flux.fromIterable(widgetBindingMap.entrySet())
.flatMap(widgetBindingEntries -> getPossibleEntityParentsMap(
widgetBindingEntries.getValue(), entityTypes, evalVersion)
.name(GET_POSSIBLE_ENTITY_PARENTS_MAP)
.tap(Micrometer.observation(observationRegistry))
.map(possibleParentsMap -> {
possibleParentsMap.entrySet().stream().forEach(entry -> {
if (entry.getValue() == null || entry.getValue().isEmpty()) {
Expand Down