diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRequestConverter.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRequestConverter.java index 85383e57..58d842d7 100644 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRequestConverter.java +++ b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRequestConverter.java @@ -2,28 +2,16 @@ import java.util.NoSuchElementException; import javax.inject.Inject; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingCreateRuleRequest; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingDeleteRuleRequest; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingUpdateRuleRequest; import org.hypertrace.graphql.spanprocessing.request.mutation.ExcludeSpanCreateRuleRequest; import org.hypertrace.graphql.spanprocessing.request.mutation.ExcludeSpanDeleteRuleRequest; import org.hypertrace.graphql.spanprocessing.request.mutation.ExcludeSpanUpdateRuleRequest; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ApiNamingRuleCreate; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ApiNamingRuleUpdate; import org.hypertrace.graphql.spanprocessing.schema.mutation.ExcludeSpanRuleCreate; import org.hypertrace.graphql.spanprocessing.schema.mutation.ExcludeSpanRuleUpdate; import org.hypertrace.graphql.spanprocessing.schema.rule.ExcludeSpanRuleRuleType; -import org.hypertrace.span.processing.config.service.v1.ApiNamingRuleConfig; -import org.hypertrace.span.processing.config.service.v1.ApiNamingRuleInfo; -import org.hypertrace.span.processing.config.service.v1.CreateApiNamingRuleRequest; import org.hypertrace.span.processing.config.service.v1.CreateExcludeSpanRuleRequest; -import org.hypertrace.span.processing.config.service.v1.DeleteApiNamingRuleRequest; import org.hypertrace.span.processing.config.service.v1.DeleteExcludeSpanRuleRequest; import org.hypertrace.span.processing.config.service.v1.ExcludeSpanRuleInfo; import org.hypertrace.span.processing.config.service.v1.RuleType; -import org.hypertrace.span.processing.config.service.v1.SegmentMatchingBasedConfig; -import org.hypertrace.span.processing.config.service.v1.UpdateApiNamingRule; -import org.hypertrace.span.processing.config.service.v1.UpdateApiNamingRuleRequest; import org.hypertrace.span.processing.config.service.v1.UpdateExcludeSpanRule; import org.hypertrace.span.processing.config.service.v1.UpdateExcludeSpanRuleRequest; @@ -70,59 +58,6 @@ DeleteExcludeSpanRuleRequest convert(ExcludeSpanDeleteRuleRequest request) { return DeleteExcludeSpanRuleRequest.newBuilder().setId(request.id()).build(); } - CreateApiNamingRuleRequest convert(ApiNamingCreateRuleRequest request) { - return CreateApiNamingRuleRequest.newBuilder() - .setRuleInfo(convertInput(request.createInput())) - .build(); - } - - private org.hypertrace.span.processing.config.service.v1.ApiNamingRuleInfo convertInput( - ApiNamingRuleCreate apiNamingRuleCreate) { - return ApiNamingRuleInfo.newBuilder() - .setName(apiNamingRuleCreate.name()) - .setFilter(this.filterConverter.convert(apiNamingRuleCreate.spanFilter())) - .setDisabled(apiNamingRuleCreate.disabled()) - .setRuleConfig(convertRuleConfig(apiNamingRuleCreate.apiNamingRuleConfig())) - .build(); - } - - private ApiNamingRuleConfig convertRuleConfig( - org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRuleConfig apiNamingRuleConfig) { - switch (apiNamingRuleConfig.apiNamingRuleConfigType()) { - case SEGMENT_MATCHING: - return ApiNamingRuleConfig.newBuilder() - .setSegmentMatchingBasedConfig( - SegmentMatchingBasedConfig.newBuilder() - .addAllRegexes(apiNamingRuleConfig.segmentMatchingBasedRuleConfig().regexes()) - .addAllValues(apiNamingRuleConfig.segmentMatchingBasedRuleConfig().values()) - .build()) - .build(); - default: - throw new NoSuchElementException( - "Unsupported api naming rule config type: " + apiNamingRuleConfig); - } - } - - UpdateApiNamingRuleRequest convert(ApiNamingUpdateRuleRequest request) { - return UpdateApiNamingRuleRequest.newBuilder() - .setRule(convertInput(request.updateInput())) - .build(); - } - - private UpdateApiNamingRule convertInput(ApiNamingRuleUpdate apiNamingRuleUpdate) { - return UpdateApiNamingRule.newBuilder() - .setId(apiNamingRuleUpdate.id()) - .setName(apiNamingRuleUpdate.name()) - .setFilter(this.filterConverter.convert(apiNamingRuleUpdate.spanFilter())) - .setDisabled(apiNamingRuleUpdate.disabled()) - .setRuleConfig(convertRuleConfig(apiNamingRuleUpdate.apiNamingRuleConfig())) - .build(); - } - - DeleteApiNamingRuleRequest convert(ApiNamingDeleteRuleRequest request) { - return DeleteApiNamingRuleRequest.newBuilder().setId(request.id()).build(); - } - RuleType convertExcludeSpanRuleRuleType(ExcludeSpanRuleRuleType ruleType) { // TODO: remove this check after making this field non-nullable if (ruleType == null) { diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingResponseConverter.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingResponseConverter.java index 41fbdfa2..cc93c8f4 100644 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingResponseConverter.java +++ b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingResponseConverter.java @@ -1,7 +1,5 @@ package org.hypertrace.graphql.spanprocessing.dao; -import static org.hypertrace.span.processing.config.service.v1.ApiNamingRuleConfig.RuleConfigCase.API_SPEC_BASED_CONFIG; - import io.reactivex.rxjava3.core.Maybe; import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.core.Single; @@ -11,17 +9,11 @@ import lombok.experimental.Accessors; import lombok.extern.slf4j.Slf4j; import org.hypertrace.graphql.spanprocessing.schema.mutation.DeleteSpanProcessingRuleResponse; -import org.hypertrace.graphql.spanprocessing.schema.query.ApiNamingRuleResultSet; import org.hypertrace.graphql.spanprocessing.schema.query.ExcludeSpanRuleResultSet; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRule; import org.hypertrace.graphql.spanprocessing.schema.rule.ExcludeSpanRule; -import org.hypertrace.span.processing.config.service.v1.CreateApiNamingRuleResponse; import org.hypertrace.span.processing.config.service.v1.CreateExcludeSpanRuleResponse; -import org.hypertrace.span.processing.config.service.v1.DeleteApiNamingRuleResponse; import org.hypertrace.span.processing.config.service.v1.DeleteExcludeSpanRuleResponse; -import org.hypertrace.span.processing.config.service.v1.GetAllApiNamingRulesResponse; import org.hypertrace.span.processing.config.service.v1.GetAllExcludeSpanRulesResponse; -import org.hypertrace.span.processing.config.service.v1.UpdateApiNamingRuleResponse; import org.hypertrace.span.processing.config.service.v1.UpdateExcludeSpanRuleResponse; @Slf4j @@ -39,10 +31,6 @@ Single convert(GetAllExcludeSpanRulesResponse response return this.convertExcludeSpanRuleResultSet(response.getRuleDetailsList()); } - Single convert(GetAllApiNamingRulesResponse response) { - return this.convertApiNamingRuleResultSet(response.getRuleDetailsList()); - } - private Maybe convertOrDrop( org.hypertrace.span.processing.config.service.v1.ExcludeSpanRuleDetails ruleDetails) { return this.ruleConverter @@ -51,20 +39,6 @@ private Maybe convertOrDrop( .onErrorComplete(); } - private Maybe convertOrDrop( - org.hypertrace.span.processing.config.service.v1.ApiNamingRuleDetails ruleDetails) { - // drop api spec based rules - if (API_SPEC_BASED_CONFIG.equals( - ruleDetails.getRule().getRuleInfo().getRuleConfig().getRuleConfigCase())) { - return Maybe.empty(); - } - - return this.ruleConverter - .convert(ruleDetails) - .doOnError(error -> log.error("Error converting ApiNamingRule", error)) - .onErrorComplete(); - } - private Single convertExcludeSpanRuleResultSet( List ruleDetails) { return Observable.fromIterable(ruleDetails) @@ -73,14 +47,6 @@ private Single convertExcludeSpanRuleResultSet( .map(ConvertedExcludeSpanRuleResultSet::new); } - private Single convertApiNamingRuleResultSet( - List ruleDetails) { - return Observable.fromIterable(ruleDetails) - .concatMapMaybe(this::convertOrDrop) - .toList() - .map(ConvertedApiNamingRuleResultSet::new); - } - Single convert(CreateExcludeSpanRuleResponse response) { return this.ruleConverter.convert(response.getRuleDetails()); } @@ -93,18 +59,6 @@ Single convert(DeleteExcludeSpanRuleResponse r return Single.just(new DefaultDeleteSpanProcessingRuleResponse(true)); } - Single convert(CreateApiNamingRuleResponse response) { - return this.ruleConverter.convert(response.getRuleDetails()); - } - - Single convert(UpdateApiNamingRuleResponse response) { - return this.ruleConverter.convert(response.getRuleDetails()); - } - - Single convert(DeleteApiNamingRuleResponse response) { - return Single.just(new DefaultDeleteSpanProcessingRuleResponse(true)); - } - @Value @Accessors(fluent = true) private static class DefaultDeleteSpanProcessingRuleResponse @@ -125,18 +79,4 @@ private ConvertedExcludeSpanRuleResultSet(List results) { this.total = results.size(); } } - - @Value - @Accessors(fluent = true) - private static class ConvertedApiNamingRuleResultSet implements ApiNamingRuleResultSet { - List results; - long total; - long count; - - private ConvertedApiNamingRuleResultSet(List results) { - this.results = results; - this.count = results.size(); - this.total = results.size(); - } - } } diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRuleConverter.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRuleConverter.java index c9dd0cec..c9530d3a 100644 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRuleConverter.java +++ b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRuleConverter.java @@ -2,21 +2,14 @@ import io.reactivex.rxjava3.core.Single; import java.time.Instant; -import java.util.List; import java.util.NoSuchElementException; import javax.inject.Inject; import lombok.Value; import lombok.experimental.Accessors; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRule; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRuleConfig; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRuleConfigType; import org.hypertrace.graphql.spanprocessing.schema.rule.ExcludeSpanRule; import org.hypertrace.graphql.spanprocessing.schema.rule.ExcludeSpanRuleRuleType; -import org.hypertrace.graphql.spanprocessing.schema.rule.SegmentMatchingBasedRuleConfig; import org.hypertrace.graphql.spanprocessing.schema.rule.filter.SpanProcessingRuleFilter; -import org.hypertrace.span.processing.config.service.v1.ApiNamingRuleDetails; import org.hypertrace.span.processing.config.service.v1.RuleType; -import org.hypertrace.span.processing.config.service.v1.SegmentMatchingBasedConfig; class ConfigServiceSpanProcessingRuleConverter { @@ -47,41 +40,6 @@ public Single convert( ruleDetails.getMetadata().getLastUpdatedTimestamp().getNanos()))); } - public Single convert(ApiNamingRuleDetails ruleDetails) { - return this.filterConverter - .convert(ruleDetails.getRule().getRuleInfo().getFilter()) - .map( - spanProcessingRuleFilter -> - new ConvertedApiNamingRule( - ruleDetails.getRule().getId(), - ruleDetails.getRule().getRuleInfo().getName(), - spanProcessingRuleFilter, - ruleDetails.getRule().getRuleInfo().getDisabled(), - convertApiNamingRuleConfig(ruleDetails.getRule().getRuleInfo().getRuleConfig()), - Instant.ofEpochSecond( - ruleDetails.getMetadata().getCreationTimestamp().getSeconds(), - ruleDetails.getMetadata().getCreationTimestamp().getNanos()), - Instant.ofEpochSecond( - ruleDetails.getMetadata().getLastUpdatedTimestamp().getSeconds(), - ruleDetails.getMetadata().getLastUpdatedTimestamp().getNanos()))); - } - - private ApiNamingRuleConfig convertApiNamingRuleConfig( - org.hypertrace.span.processing.config.service.v1.ApiNamingRuleConfig apiNamingRuleConfig) { - switch (apiNamingRuleConfig.getRuleConfigCase()) { - case SEGMENT_MATCHING_BASED_CONFIG: - SegmentMatchingBasedConfig segmentMatchingBasedConfig = - apiNamingRuleConfig.getSegmentMatchingBasedConfig(); - return new ConvertedApiNamingRuleConfig( - ApiNamingRuleConfigType.SEGMENT_MATCHING, - new ConvertedSegmentMatchingBasedRuleConfig( - segmentMatchingBasedConfig.getRegexesList(), - segmentMatchingBasedConfig.getValuesList())); - default: - throw new NoSuchElementException("Unsupported Rule config type: " + apiNamingRuleConfig); - } - } - private ExcludeSpanRuleRuleType convertExcludeSpanRuleRuleType(RuleType ruleType) { switch (ruleType) { case RULE_TYPE_UNSPECIFIED: // required to cater for the older user configs(as they didn't @@ -106,31 +64,4 @@ private static class ConvertedExcludeSpanRule implements ExcludeSpanRule { Instant creationTime; Instant lastUpdatedTime; } - - @Value - @Accessors(fluent = true) - private static class ConvertedApiNamingRule implements ApiNamingRule { - String id; - String name; - SpanProcessingRuleFilter spanFilter; - boolean disabled; - ApiNamingRuleConfig apiNamingRuleConfig; - Instant creationTime; - Instant lastUpdatedTime; - } - - @Value - @Accessors(fluent = true) - private static class ConvertedApiNamingRuleConfig implements ApiNamingRuleConfig { - ApiNamingRuleConfigType apiNamingRuleConfigType; - SegmentMatchingBasedRuleConfig segmentMatchingBasedRuleConfig; - } - - @Value - @Accessors(fluent = true) - private static class ConvertedSegmentMatchingBasedRuleConfig - implements SegmentMatchingBasedRuleConfig { - List regexes; - List values; - } } diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRuleDao.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRuleDao.java index d11e51fd..96cd9b85 100644 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRuleDao.java +++ b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/ConfigServiceSpanProcessingRuleDao.java @@ -9,18 +9,12 @@ import org.hypertrace.core.graphql.utils.grpc.GrpcChannelRegistry; import org.hypertrace.core.graphql.utils.grpc.GrpcContextBuilder; import org.hypertrace.graphql.config.HypertraceGraphQlServiceConfig; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingCreateRuleRequest; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingDeleteRuleRequest; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingUpdateRuleRequest; import org.hypertrace.graphql.spanprocessing.request.mutation.ExcludeSpanCreateRuleRequest; import org.hypertrace.graphql.spanprocessing.request.mutation.ExcludeSpanDeleteRuleRequest; import org.hypertrace.graphql.spanprocessing.request.mutation.ExcludeSpanUpdateRuleRequest; import org.hypertrace.graphql.spanprocessing.schema.mutation.DeleteSpanProcessingRuleResponse; -import org.hypertrace.graphql.spanprocessing.schema.query.ApiNamingRuleResultSet; import org.hypertrace.graphql.spanprocessing.schema.query.ExcludeSpanRuleResultSet; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRule; import org.hypertrace.graphql.spanprocessing.schema.rule.ExcludeSpanRule; -import org.hypertrace.span.processing.config.service.v1.GetAllApiNamingRulesRequest; import org.hypertrace.span.processing.config.service.v1.GetAllExcludeSpanRulesRequest; import org.hypertrace.span.processing.config.service.v1.SpanProcessingConfigServiceGrpc; @@ -108,62 +102,4 @@ public Single deleteExcludeSpanRule( .deleteExcludeSpanRule(this.requestConverter.convert(request)))) .flatMap(this.responseConverter::convert); } - - @Override - public Single getApiNamingRules(ContextualRequest request) { - return Single.fromFuture( - this.grpcContextBuilder - .build(request.context()) - .call( - () -> - this.configStub - .withDeadlineAfter( - serviceConfig.getConfigServiceTimeout().toMillis(), MILLISECONDS) - .getAllApiNamingRules( - GetAllApiNamingRulesRequest.getDefaultInstance()))) - .flatMap(this.responseConverter::convert); - } - - @Override - public Single createApiNamingRule(ApiNamingCreateRuleRequest request) { - return Single.fromFuture( - this.grpcContextBuilder - .build(request.context()) - .call( - () -> - this.configStub - .withDeadlineAfter( - serviceConfig.getConfigServiceTimeout().toMillis(), MILLISECONDS) - .createApiNamingRule(this.requestConverter.convert(request)))) - .flatMap(this.responseConverter::convert); - } - - @Override - public Single updateApiNamingRule(ApiNamingUpdateRuleRequest request) { - return Single.fromFuture( - this.grpcContextBuilder - .build(request.context()) - .call( - () -> - this.configStub - .withDeadlineAfter( - serviceConfig.getConfigServiceTimeout().toMillis(), MILLISECONDS) - .updateApiNamingRule(this.requestConverter.convert(request)))) - .flatMap(this.responseConverter::convert); - } - - @Override - public Single deleteApiNamingRule( - ApiNamingDeleteRuleRequest request) { - return Single.fromFuture( - this.grpcContextBuilder - .build(request.context()) - .call( - () -> - this.configStub - .withDeadlineAfter( - serviceConfig.getConfigServiceTimeout().toMillis(), MILLISECONDS) - .deleteApiNamingRule(this.requestConverter.convert(request)))) - .flatMap(this.responseConverter::convert); - } } diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/SpanProcessingRuleDao.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/SpanProcessingRuleDao.java index f55015c3..76b5afd6 100644 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/SpanProcessingRuleDao.java +++ b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/dao/SpanProcessingRuleDao.java @@ -2,16 +2,11 @@ import io.reactivex.rxjava3.core.Single; import org.hypertrace.core.graphql.common.request.ContextualRequest; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingCreateRuleRequest; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingDeleteRuleRequest; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingUpdateRuleRequest; import org.hypertrace.graphql.spanprocessing.request.mutation.ExcludeSpanCreateRuleRequest; import org.hypertrace.graphql.spanprocessing.request.mutation.ExcludeSpanDeleteRuleRequest; import org.hypertrace.graphql.spanprocessing.request.mutation.ExcludeSpanUpdateRuleRequest; import org.hypertrace.graphql.spanprocessing.schema.mutation.DeleteSpanProcessingRuleResponse; -import org.hypertrace.graphql.spanprocessing.schema.query.ApiNamingRuleResultSet; import org.hypertrace.graphql.spanprocessing.schema.query.ExcludeSpanRuleResultSet; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRule; import org.hypertrace.graphql.spanprocessing.schema.rule.ExcludeSpanRule; public interface SpanProcessingRuleDao { @@ -23,12 +18,4 @@ public interface SpanProcessingRuleDao { Single deleteExcludeSpanRule( ExcludeSpanDeleteRuleRequest request); - - Single getApiNamingRules(ContextualRequest request); - - Single createApiNamingRule(ApiNamingCreateRuleRequest request); - - Single updateApiNamingRule(ApiNamingUpdateRuleRequest request); - - Single deleteApiNamingRule(ApiNamingDeleteRuleRequest request); } diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/ApiNamingCreateInputDeserializationConfig.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/ApiNamingCreateInputDeserializationConfig.java deleted file mode 100644 index 22d9ef50..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/ApiNamingCreateInputDeserializationConfig.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.deserialization; - -import com.fasterxml.jackson.databind.Module; -import com.fasterxml.jackson.databind.module.SimpleModule; -import java.util.List; -import lombok.Builder; -import lombok.Value; -import lombok.experimental.Accessors; -import lombok.extern.jackson.Jacksonized; -import org.hypertrace.core.graphql.deserialization.ArgumentDeserializationConfig; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ApiNamingRuleCreate; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRuleConfig; -import org.hypertrace.graphql.spanprocessing.schema.rule.SegmentMatchingBasedRuleConfig; -import org.hypertrace.graphql.spanprocessing.schema.rule.filter.SpanProcessingLogicalFilter; -import org.hypertrace.graphql.spanprocessing.schema.rule.filter.SpanProcessingRelationalFilter; -import org.hypertrace.graphql.spanprocessing.schema.rule.filter.SpanProcessingRuleFilter; - -public class ApiNamingCreateInputDeserializationConfig implements ArgumentDeserializationConfig { - @Override - public String getArgumentKey() { - return ApiNamingRuleCreate.ARGUMENT_NAME; - } - - @Override - public Class getArgumentSchema() { - return ApiNamingRuleCreate.class; - } - - @Override - public List jacksonModules() { - return List.of( - new SimpleModule() - .addAbstractTypeMapping(ApiNamingRuleCreate.class, DefaultApiNamingRuleCreate.class) - .addAbstractTypeMapping(ApiNamingRuleConfig.class, DefaultApiNamingRuleConfig.class) - .addAbstractTypeMapping( - SegmentMatchingBasedRuleConfig.class, DefaultSegmentMatchingBasedRuleConfig.class) - .addAbstractTypeMapping( - SpanProcessingRuleFilter.class, DefaultSpanProcessingRuleFilter.class) - .addAbstractTypeMapping( - SpanProcessingRelationalFilter.class, DefaultSpanProcessingRelationalFilter.class) - .addAbstractTypeMapping( - SpanProcessingLogicalFilter.class, DefaultSpanProcessingLogicalFilter.class)); - } - - @Value - @Accessors(fluent = true) - @Jacksonized - @Builder - private static class DefaultApiNamingRuleCreate implements ApiNamingRuleCreate { - String name; - SpanProcessingRuleFilter spanFilter; - ApiNamingRuleConfig apiNamingRuleConfig; - boolean disabled; - } -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/ApiNamingDeleteInputDeserializationConfig.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/ApiNamingDeleteInputDeserializationConfig.java deleted file mode 100644 index 8e230834..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/ApiNamingDeleteInputDeserializationConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.deserialization; - -import com.fasterxml.jackson.databind.Module; -import com.fasterxml.jackson.databind.module.SimpleModule; -import java.util.List; -import lombok.Builder; -import lombok.Value; -import lombok.experimental.Accessors; -import lombok.extern.jackson.Jacksonized; -import org.hypertrace.core.graphql.deserialization.ArgumentDeserializationConfig; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ApiNamingRuleDelete; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ExcludeSpanRuleDelete; - -public class ApiNamingDeleteInputDeserializationConfig implements ArgumentDeserializationConfig { - @Override - public String getArgumentKey() { - return ExcludeSpanRuleDelete.ARGUMENT_NAME; - } - - @Override - public Class getArgumentSchema() { - return ApiNamingRuleDelete.class; - } - - @Override - public List jacksonModules() { - return List.of( - new SimpleModule() - .addAbstractTypeMapping(ApiNamingRuleDelete.class, DefaultApiNamingRuleDelete.class)); - } - - @Value - @Accessors(fluent = true) - @Jacksonized - @Builder - private static class DefaultApiNamingRuleDelete implements ApiNamingRuleDelete { - String id; - } -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/ApiNamingUpdateInputDeserializationConfig.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/ApiNamingUpdateInputDeserializationConfig.java deleted file mode 100644 index 333f226d..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/ApiNamingUpdateInputDeserializationConfig.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.deserialization; - -import com.fasterxml.jackson.databind.Module; -import com.fasterxml.jackson.databind.module.SimpleModule; -import java.util.List; -import lombok.Builder; -import lombok.Value; -import lombok.experimental.Accessors; -import lombok.extern.jackson.Jacksonized; -import org.hypertrace.core.graphql.deserialization.ArgumentDeserializationConfig; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ApiNamingRuleUpdate; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRuleConfig; -import org.hypertrace.graphql.spanprocessing.schema.rule.SegmentMatchingBasedRuleConfig; -import org.hypertrace.graphql.spanprocessing.schema.rule.filter.SpanProcessingLogicalFilter; -import org.hypertrace.graphql.spanprocessing.schema.rule.filter.SpanProcessingRelationalFilter; -import org.hypertrace.graphql.spanprocessing.schema.rule.filter.SpanProcessingRuleFilter; - -public class ApiNamingUpdateInputDeserializationConfig implements ArgumentDeserializationConfig { - @Override - public String getArgumentKey() { - return ApiNamingRuleUpdate.ARGUMENT_NAME; - } - - @Override - public Class getArgumentSchema() { - return ApiNamingRuleUpdate.class; - } - - @Override - public List jacksonModules() { - return List.of( - new SimpleModule() - .addAbstractTypeMapping(ApiNamingRuleUpdate.class, DefaultApiNamingRuleUpdate.class) - .addAbstractTypeMapping(ApiNamingRuleConfig.class, DefaultApiNamingRuleConfig.class) - .addAbstractTypeMapping( - SegmentMatchingBasedRuleConfig.class, DefaultSegmentMatchingBasedRuleConfig.class) - .addAbstractTypeMapping( - SpanProcessingRuleFilter.class, DefaultSpanProcessingRuleFilter.class) - .addAbstractTypeMapping( - SpanProcessingRelationalFilter.class, DefaultSpanProcessingRelationalFilter.class) - .addAbstractTypeMapping( - SpanProcessingLogicalFilter.class, DefaultSpanProcessingLogicalFilter.class)); - } - - @Value - @Accessors(fluent = true) - @Jacksonized - @Builder - private static class DefaultApiNamingRuleUpdate implements ApiNamingRuleUpdate { - String id; - String name; - SpanProcessingRuleFilter spanFilter; - boolean disabled; - ApiNamingRuleConfig apiNamingRuleConfig; - } -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/DefaultApiNamingRuleConfig.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/DefaultApiNamingRuleConfig.java deleted file mode 100644 index d7e1a747..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/DefaultApiNamingRuleConfig.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.deserialization; - -import lombok.Builder; -import lombok.Value; -import lombok.experimental.Accessors; -import lombok.extern.jackson.Jacksonized; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRuleConfig; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRuleConfigType; -import org.hypertrace.graphql.spanprocessing.schema.rule.SegmentMatchingBasedRuleConfig; - -@Value -@Accessors(fluent = true) -@Jacksonized -@Builder -public class DefaultApiNamingRuleConfig implements ApiNamingRuleConfig { - ApiNamingRuleConfigType apiNamingRuleConfigType; - SegmentMatchingBasedRuleConfig segmentMatchingBasedRuleConfig; -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/DefaultSegmentMatchingBasedRuleConfig.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/DefaultSegmentMatchingBasedRuleConfig.java deleted file mode 100644 index 7079e640..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/DefaultSegmentMatchingBasedRuleConfig.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.deserialization; - -import java.util.List; -import lombok.Builder; -import lombok.Value; -import lombok.experimental.Accessors; -import lombok.extern.jackson.Jacksonized; -import org.hypertrace.graphql.spanprocessing.schema.rule.SegmentMatchingBasedRuleConfig; - -@Value -@Accessors(fluent = true) -@Jacksonized -@Builder -public class DefaultSegmentMatchingBasedRuleConfig implements SegmentMatchingBasedRuleConfig { - List regexes; - List values; -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/SpanProcessingDeserializationModule.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/SpanProcessingDeserializationModule.java index 52b4ff01..5ab927a2 100644 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/SpanProcessingDeserializationModule.java +++ b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/deserialization/SpanProcessingDeserializationModule.java @@ -13,9 +13,5 @@ protected void configure() { multibinder.addBinding().to(ExcludeSpanCreateInputDeserializationConfig.class); multibinder.addBinding().to(ExcludeSpanUpdateInputDeserializationConfig.class); multibinder.addBinding().to(ExcludeSpanDeleteInputDeserializationConfig.class); - - multibinder.addBinding().to(ApiNamingCreateInputDeserializationConfig.class); - multibinder.addBinding().to(ApiNamingUpdateInputDeserializationConfig.class); - multibinder.addBinding().to(ApiNamingDeleteInputDeserializationConfig.class); } } diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/mutation/ApiNamingCreateRuleMutator.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/mutation/ApiNamingCreateRuleMutator.java deleted file mode 100644 index 37769b66..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/mutation/ApiNamingCreateRuleMutator.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.fetcher.mutation; - -import graphql.schema.DataFetcher; -import graphql.schema.DataFetchingEnvironment; -import java.util.concurrent.CompletableFuture; -import javax.inject.Inject; -import org.hypertrace.core.graphql.common.fetcher.InjectableDataFetcher; -import org.hypertrace.graphql.spanprocessing.dao.SpanProcessingRuleDao; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingCreateRuleRequestBuilder; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRule; - -public class ApiNamingCreateRuleMutator extends InjectableDataFetcher { - - public ApiNamingCreateRuleMutator() { - super(ApiNamingCreateRuleMutatorImpl.class); - } - - static final class ApiNamingCreateRuleMutatorImpl - implements DataFetcher> { - private final SpanProcessingRuleDao spanProcessingRuleDao; - private final ApiNamingCreateRuleRequestBuilder requestBuilder; - - @Inject - ApiNamingCreateRuleMutatorImpl( - ApiNamingCreateRuleRequestBuilder requestBuilder, - SpanProcessingRuleDao spanProcessingRuleDao) { - this.requestBuilder = requestBuilder; - this.spanProcessingRuleDao = spanProcessingRuleDao; - } - - @Override - public CompletableFuture get(DataFetchingEnvironment environment) { - return this.requestBuilder - .build(environment.getContext(), environment.getArguments()) - .flatMap(this.spanProcessingRuleDao::createApiNamingRule) - .toCompletionStage() - .toCompletableFuture(); - } - } -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/mutation/ApiNamingDeleteRuleMutator.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/mutation/ApiNamingDeleteRuleMutator.java deleted file mode 100644 index 0e618c6d..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/mutation/ApiNamingDeleteRuleMutator.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.fetcher.mutation; - -import graphql.schema.DataFetcher; -import graphql.schema.DataFetchingEnvironment; -import java.util.concurrent.CompletableFuture; -import javax.inject.Inject; -import org.hypertrace.core.graphql.common.fetcher.InjectableDataFetcher; -import org.hypertrace.graphql.spanprocessing.dao.SpanProcessingRuleDao; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingDeleteRuleRequestBuilder; -import org.hypertrace.graphql.spanprocessing.schema.mutation.DeleteSpanProcessingRuleResponse; - -public class ApiNamingDeleteRuleMutator - extends InjectableDataFetcher { - - public ApiNamingDeleteRuleMutator() { - super(ApiNamingDeleteRuleMutatorImpl.class); - } - - static final class ApiNamingDeleteRuleMutatorImpl - implements DataFetcher> { - private final SpanProcessingRuleDao spanProcessingRuleDao; - private final ApiNamingDeleteRuleRequestBuilder requestBuilder; - - @Inject - ApiNamingDeleteRuleMutatorImpl( - ApiNamingDeleteRuleRequestBuilder requestBuilder, - SpanProcessingRuleDao spanProcessingRuleDao) { - this.requestBuilder = requestBuilder; - this.spanProcessingRuleDao = spanProcessingRuleDao; - } - - @Override - public CompletableFuture get( - DataFetchingEnvironment environment) { - return this.requestBuilder - .build(environment.getContext(), environment.getArguments()) - .flatMap(this.spanProcessingRuleDao::deleteApiNamingRule) - .toCompletionStage() - .toCompletableFuture(); - } - } -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/mutation/ApiNamingUpdateRuleMutator.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/mutation/ApiNamingUpdateRuleMutator.java deleted file mode 100644 index 89ae9b07..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/mutation/ApiNamingUpdateRuleMutator.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.fetcher.mutation; - -import graphql.schema.DataFetcher; -import graphql.schema.DataFetchingEnvironment; -import java.util.concurrent.CompletableFuture; -import javax.inject.Inject; -import org.hypertrace.core.graphql.common.fetcher.InjectableDataFetcher; -import org.hypertrace.graphql.spanprocessing.dao.SpanProcessingRuleDao; -import org.hypertrace.graphql.spanprocessing.request.mutation.ApiNamingUpdateRuleRequestBuilder; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRule; - -public class ApiNamingUpdateRuleMutator extends InjectableDataFetcher { - - public ApiNamingUpdateRuleMutator() { - super(ApiNamingUpdateRuleMutatorImpl.class); - } - - static final class ApiNamingUpdateRuleMutatorImpl - implements DataFetcher> { - private final SpanProcessingRuleDao spanProcessingRuleDao; - private final ApiNamingUpdateRuleRequestBuilder requestBuilder; - - @Inject - ApiNamingUpdateRuleMutatorImpl( - ApiNamingUpdateRuleRequestBuilder requestBuilder, - SpanProcessingRuleDao spanProcessingRuleDao) { - this.requestBuilder = requestBuilder; - this.spanProcessingRuleDao = spanProcessingRuleDao; - } - - @Override - public CompletableFuture get(DataFetchingEnvironment environment) { - return this.requestBuilder - .build(environment.getContext(), environment.getArguments()) - .flatMap(this.spanProcessingRuleDao::updateApiNamingRule) - .toCompletionStage() - .toCompletableFuture(); - } - } -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/query/ApiNamingRulesFetcher.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/query/ApiNamingRulesFetcher.java deleted file mode 100644 index b44f091d..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/fetcher/query/ApiNamingRulesFetcher.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.fetcher.query; - -import graphql.schema.DataFetcher; -import graphql.schema.DataFetchingEnvironment; -import java.util.concurrent.CompletableFuture; -import javax.inject.Inject; -import org.hypertrace.core.graphql.common.fetcher.InjectableDataFetcher; -import org.hypertrace.core.graphql.common.request.ContextualRequestBuilder; -import org.hypertrace.graphql.spanprocessing.dao.SpanProcessingRuleDao; -import org.hypertrace.graphql.spanprocessing.schema.query.ApiNamingRuleResultSet; - -public class ApiNamingRulesFetcher extends InjectableDataFetcher { - - public ApiNamingRulesFetcher() { - super(ApiNamingRulesFetcherImpl.class); - } - - static final class ApiNamingRulesFetcherImpl - implements DataFetcher> { - private final SpanProcessingRuleDao spanProcessingRuleDao; - private final ContextualRequestBuilder requestBuilder; - - @Inject - ApiNamingRulesFetcherImpl( - ContextualRequestBuilder requestBuilder, SpanProcessingRuleDao spanProcessingRuleDao) { - this.requestBuilder = requestBuilder; - this.spanProcessingRuleDao = spanProcessingRuleDao; - } - - @Override - public CompletableFuture get(DataFetchingEnvironment environment) { - return this.spanProcessingRuleDao - .getApiNamingRules(this.requestBuilder.build(environment.getContext())) - .toCompletionStage() - .toCompletableFuture(); - } - } -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingCreateRuleRequest.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingCreateRuleRequest.java deleted file mode 100644 index febb4d7a..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingCreateRuleRequest.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.request.mutation; - -import org.hypertrace.core.graphql.context.GraphQlRequestContext; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ApiNamingRuleCreate; - -public interface ApiNamingCreateRuleRequest { - GraphQlRequestContext context(); - - ApiNamingRuleCreate createInput(); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingCreateRuleRequestBuilder.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingCreateRuleRequestBuilder.java deleted file mode 100644 index 0ad05f14..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingCreateRuleRequestBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.request.mutation; - -import io.reactivex.rxjava3.core.Single; -import java.util.Map; -import org.hypertrace.core.graphql.context.GraphQlRequestContext; - -public interface ApiNamingCreateRuleRequestBuilder { - Single build( - GraphQlRequestContext context, Map arguments); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingDeleteRuleRequest.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingDeleteRuleRequest.java deleted file mode 100644 index 651b811e..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingDeleteRuleRequest.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.request.mutation; - -import org.hypertrace.core.graphql.context.GraphQlRequestContext; - -public interface ApiNamingDeleteRuleRequest { - GraphQlRequestContext context(); - - String id(); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingDeleteRuleRequestBuilder.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingDeleteRuleRequestBuilder.java deleted file mode 100644 index 51423ab3..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingDeleteRuleRequestBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.request.mutation; - -import io.reactivex.rxjava3.core.Single; -import java.util.Map; -import org.hypertrace.core.graphql.context.GraphQlRequestContext; - -public interface ApiNamingDeleteRuleRequestBuilder { - Single build( - GraphQlRequestContext context, Map arguments); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingUpdateRuleRequest.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingUpdateRuleRequest.java deleted file mode 100644 index c4541fc4..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingUpdateRuleRequest.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.request.mutation; - -import org.hypertrace.core.graphql.context.GraphQlRequestContext; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ApiNamingRuleUpdate; - -public interface ApiNamingUpdateRuleRequest { - GraphQlRequestContext context(); - - ApiNamingRuleUpdate updateInput(); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingUpdateRuleRequestBuilder.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingUpdateRuleRequestBuilder.java deleted file mode 100644 index 7dbebeba..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/ApiNamingUpdateRuleRequestBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.request.mutation; - -import io.reactivex.rxjava3.core.Single; -import java.util.Map; -import org.hypertrace.core.graphql.context.GraphQlRequestContext; - -public interface ApiNamingUpdateRuleRequestBuilder { - Single build( - GraphQlRequestContext context, Map arguments); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/DefaultApiNamingCreateRuleRequestBuilder.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/DefaultApiNamingCreateRuleRequestBuilder.java deleted file mode 100644 index d478c2bf..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/DefaultApiNamingCreateRuleRequestBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.request.mutation; - -import io.reactivex.rxjava3.core.Single; -import java.util.Map; -import javax.inject.Inject; -import lombok.Value; -import lombok.experimental.Accessors; -import org.hypertrace.core.graphql.context.GraphQlRequestContext; -import org.hypertrace.core.graphql.deserialization.ArgumentDeserializer; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ApiNamingRuleCreate; - -public class DefaultApiNamingCreateRuleRequestBuilder implements ApiNamingCreateRuleRequestBuilder { - - private final ArgumentDeserializer argumentDeserializer; - - @Inject - DefaultApiNamingCreateRuleRequestBuilder(ArgumentDeserializer argumentDeserializer) { - this.argumentDeserializer = argumentDeserializer; - } - - @Override - public Single build( - GraphQlRequestContext context, Map arguments) { - ApiNamingRuleCreate apiNamingRuleCreateInput = - this.argumentDeserializer - .deserializeObject(arguments, ApiNamingRuleCreate.class) - .orElseThrow(); - return Single.just(new DefaultApiNamingCreateRuleRequest(context, apiNamingRuleCreateInput)); - } - - @Value - @Accessors(fluent = true) - private static class DefaultApiNamingCreateRuleRequest implements ApiNamingCreateRuleRequest { - GraphQlRequestContext context; - ApiNamingRuleCreate createInput; - } -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/DefaultApiNamingDeleteRuleRequestBuilder.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/DefaultApiNamingDeleteRuleRequestBuilder.java deleted file mode 100644 index 8abb15cb..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/DefaultApiNamingDeleteRuleRequestBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.request.mutation; - -import io.reactivex.rxjava3.core.Single; -import java.util.Map; -import javax.inject.Inject; -import lombok.Value; -import lombok.experimental.Accessors; -import org.hypertrace.core.graphql.context.GraphQlRequestContext; -import org.hypertrace.core.graphql.deserialization.ArgumentDeserializer; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ApiNamingRuleDelete; - -public class DefaultApiNamingDeleteRuleRequestBuilder implements ApiNamingDeleteRuleRequestBuilder { - - private final ArgumentDeserializer argumentDeserializer; - - @Inject - DefaultApiNamingDeleteRuleRequestBuilder(ArgumentDeserializer argumentDeserializer) { - this.argumentDeserializer = argumentDeserializer; - } - - @Override - public Single build( - GraphQlRequestContext context, Map arguments) { - String idToDelete = - this.argumentDeserializer - .deserializeObject(arguments, ApiNamingRuleDelete.class) - .map(ApiNamingRuleDelete::id) - .orElseThrow(); - return Single.just(new DefaultApiNamingDeleteRuleRequest(context, idToDelete)); - } - - @Value - @Accessors(fluent = true) - private static class DefaultApiNamingDeleteRuleRequest implements ApiNamingDeleteRuleRequest { - GraphQlRequestContext context; - String id; - } -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/DefaultApiNamingUpdateRuleRequestBuilder.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/DefaultApiNamingUpdateRuleRequestBuilder.java deleted file mode 100644 index cf035f31..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/DefaultApiNamingUpdateRuleRequestBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.request.mutation; - -import io.reactivex.rxjava3.core.Single; -import java.util.Map; -import javax.inject.Inject; -import lombok.Value; -import lombok.experimental.Accessors; -import org.hypertrace.core.graphql.context.GraphQlRequestContext; -import org.hypertrace.core.graphql.deserialization.ArgumentDeserializer; -import org.hypertrace.graphql.spanprocessing.schema.mutation.ApiNamingRuleUpdate; - -public class DefaultApiNamingUpdateRuleRequestBuilder implements ApiNamingUpdateRuleRequestBuilder { - - private final ArgumentDeserializer argumentDeserializer; - - @Inject - DefaultApiNamingUpdateRuleRequestBuilder(ArgumentDeserializer argumentDeserializer) { - this.argumentDeserializer = argumentDeserializer; - } - - @Override - public Single build( - GraphQlRequestContext context, Map arguments) { - ApiNamingRuleUpdate ApiNamingRuleUpdateInput = - this.argumentDeserializer - .deserializeObject(arguments, ApiNamingRuleUpdate.class) - .orElseThrow(); - return Single.just(new DefaultApiNamingUpdateRuleRequest(context, ApiNamingRuleUpdateInput)); - } - - @Value - @Accessors(fluent = true) - private static class DefaultApiNamingUpdateRuleRequest implements ApiNamingUpdateRuleRequest { - GraphQlRequestContext context; - ApiNamingRuleUpdate updateInput; - } -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/SpanProcessingMutationRequestModule.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/SpanProcessingMutationRequestModule.java index 46222433..46b4d7ea 100644 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/SpanProcessingMutationRequestModule.java +++ b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/request/mutation/SpanProcessingMutationRequestModule.java @@ -14,13 +14,6 @@ protected void configure() { bind(ExcludeSpanDeleteRuleRequestBuilder.class) .to(DefaultExcludeSpanDeleteRuleRequestBuilder.class); - bind(ApiNamingCreateRuleRequestBuilder.class) - .to(DefaultApiNamingCreateRuleRequestBuilder.class); - bind(ApiNamingUpdateRuleRequestBuilder.class) - .to(DefaultApiNamingUpdateRuleRequestBuilder.class); - bind(ApiNamingDeleteRuleRequestBuilder.class) - .to(DefaultApiNamingDeleteRuleRequestBuilder.class); - requireBinding(ArgumentDeserializer.class); } } diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/ApiNamingRuleCreate.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/ApiNamingRuleCreate.java deleted file mode 100644 index 5b9b8bc3..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/ApiNamingRuleCreate.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.schema.mutation; - -import graphql.annotations.annotationTypes.GraphQLName; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRuleInfo; - -@GraphQLName(ApiNamingRuleCreate.TYPE_NAME) -public interface ApiNamingRuleCreate extends ApiNamingRuleInfo { - String TYPE_NAME = "ApiNamingRuleCreate"; - String ARGUMENT_NAME = "input"; -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/ApiNamingRuleDelete.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/ApiNamingRuleDelete.java deleted file mode 100644 index 623c5ae3..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/ApiNamingRuleDelete.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.schema.mutation; - -import graphql.annotations.annotationTypes.GraphQLName; -import org.hypertrace.core.graphql.common.schema.id.Identifiable; - -@GraphQLName(ApiNamingRuleDelete.TYPE_NAME) -public interface ApiNamingRuleDelete extends Identifiable { - String TYPE_NAME = "ApiNamingRuleDelete"; - String ARGUMENT_NAME = "input"; -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/ApiNamingRuleUpdate.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/ApiNamingRuleUpdate.java deleted file mode 100644 index f5d1ed7d..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/ApiNamingRuleUpdate.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.schema.mutation; - -import graphql.annotations.annotationTypes.GraphQLField; -import graphql.annotations.annotationTypes.GraphQLName; -import graphql.annotations.annotationTypes.GraphQLNonNull; -import org.hypertrace.core.graphql.common.schema.id.Identifiable; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRuleConfig; -import org.hypertrace.graphql.spanprocessing.schema.rule.filter.SpanProcessingRuleFilter; - -@GraphQLName(ApiNamingRuleUpdate.TYPE_NAME) -public interface ApiNamingRuleUpdate extends Identifiable { - String TYPE_NAME = "ApiNamingRuleUpdate"; - String ARGUMENT_NAME = "input"; - - String NAME_KEY = "name"; - String SPAN_PROCESSING_FILTER_KEY = "spanFilter"; - String DISABLED_KEY = "disabled"; - String API_NAMING_RULE_CONFIG_KEY = "apiNamingRuleConfig"; - - @GraphQLField - @GraphQLName(NAME_KEY) - @GraphQLNonNull - String name(); - - @GraphQLField - @GraphQLName(SPAN_PROCESSING_FILTER_KEY) - @GraphQLNonNull - SpanProcessingRuleFilter spanFilter(); - - @GraphQLField - @GraphQLName(DISABLED_KEY) - @GraphQLNonNull - boolean disabled(); - - @GraphQLField - @GraphQLName(API_NAMING_RULE_CONFIG_KEY) - @GraphQLNonNull - ApiNamingRuleConfig apiNamingRuleConfig(); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/SpanProcessingMutationSchema.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/SpanProcessingMutationSchema.java index ba9eea2a..e8a51b4a 100644 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/SpanProcessingMutationSchema.java +++ b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/mutation/SpanProcessingMutationSchema.java @@ -4,22 +4,15 @@ import graphql.annotations.annotationTypes.GraphQLField; import graphql.annotations.annotationTypes.GraphQLName; import graphql.annotations.annotationTypes.GraphQLNonNull; -import org.hypertrace.graphql.spanprocessing.fetcher.mutation.ApiNamingCreateRuleMutator; -import org.hypertrace.graphql.spanprocessing.fetcher.mutation.ApiNamingDeleteRuleMutator; -import org.hypertrace.graphql.spanprocessing.fetcher.mutation.ApiNamingUpdateRuleMutator; import org.hypertrace.graphql.spanprocessing.fetcher.mutation.ExcludeSpanCreateRuleMutator; import org.hypertrace.graphql.spanprocessing.fetcher.mutation.ExcludeSpanDeleteRuleMutator; import org.hypertrace.graphql.spanprocessing.fetcher.mutation.ExcludeSpanUpdateRuleMutator; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRule; import org.hypertrace.graphql.spanprocessing.schema.rule.ExcludeSpanRule; public interface SpanProcessingMutationSchema { String CREATE_EXCLUDE_SPAN_RULE_MUTATION_NAME = "createExcludeSpanRule"; String UPDATE_EXCLUDE_SPAN_RULE_MUTATION_NAME = "updateExcludeSpanRule"; String DELETE_EXCLUDE_SPAN_RULE_MUTATION_NAME = "deleteExcludeSpanRule"; - String CREATE_API_NAMING_RULE_MUTATION_NAME = "createApiNamingRule"; - String UPDATE_API_NAMING_RULE_MUTATION_NAME = "updateApiNamingRule"; - String DELETE_API_NAMING_RULE_MUTATION_NAME = "deleteApiNamingRule"; @GraphQLField @GraphQLName(CREATE_EXCLUDE_SPAN_RULE_MUTATION_NAME) @@ -44,25 +37,4 @@ ExcludeSpanRule updateExcludeSpanRule( DeleteSpanProcessingRuleResponse deleteExcludeSpanRule( @GraphQLName(ExcludeSpanRuleDelete.ARGUMENT_NAME) @GraphQLNonNull ExcludeSpanRuleDelete input); - - @GraphQLField - @GraphQLName(CREATE_API_NAMING_RULE_MUTATION_NAME) - @GraphQLNonNull - @GraphQLDataFetcher(ApiNamingCreateRuleMutator.class) - ApiNamingRule createApiNamingRule( - @GraphQLName(ApiNamingRuleCreate.ARGUMENT_NAME) @GraphQLNonNull ApiNamingRuleCreate input); - - @GraphQLField - @GraphQLName(UPDATE_API_NAMING_RULE_MUTATION_NAME) - @GraphQLNonNull - @GraphQLDataFetcher(ApiNamingUpdateRuleMutator.class) - ApiNamingRule updateApiNamingRule( - @GraphQLName(ApiNamingRuleUpdate.ARGUMENT_NAME) @GraphQLNonNull ApiNamingRuleUpdate input); - - @GraphQLField - @GraphQLName(DELETE_API_NAMING_RULE_MUTATION_NAME) - @GraphQLNonNull - @GraphQLDataFetcher(ApiNamingDeleteRuleMutator.class) - DeleteSpanProcessingRuleResponse deleteApiNamingRule( - @GraphQLName(ApiNamingRuleDelete.ARGUMENT_NAME) @GraphQLNonNull ApiNamingRuleDelete input); } diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/query/ApiNamingRuleResultSet.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/query/ApiNamingRuleResultSet.java deleted file mode 100644 index 380d5873..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/query/ApiNamingRuleResultSet.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.schema.query; - -import graphql.annotations.annotationTypes.GraphQLField; -import graphql.annotations.annotationTypes.GraphQLName; -import graphql.annotations.annotationTypes.GraphQLNonNull; -import java.util.List; -import org.hypertrace.core.graphql.common.schema.results.ResultSet; -import org.hypertrace.graphql.spanprocessing.schema.rule.ApiNamingRule; - -@GraphQLName(ApiNamingRuleResultSet.TYPE_NAME) -public interface ApiNamingRuleResultSet extends ResultSet { - String TYPE_NAME = "ApiNamingRuleResultSet"; - - @Override - @GraphQLField - @GraphQLNonNull - @GraphQLName(RESULT_SET_RESULTS_NAME) - List results(); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/query/SpanProcessingQuerySchema.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/query/SpanProcessingQuerySchema.java index 5163ff51..60aa3e52 100644 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/query/SpanProcessingQuerySchema.java +++ b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/query/SpanProcessingQuerySchema.java @@ -4,22 +4,14 @@ import graphql.annotations.annotationTypes.GraphQLField; import graphql.annotations.annotationTypes.GraphQLName; import graphql.annotations.annotationTypes.GraphQLNonNull; -import org.hypertrace.graphql.spanprocessing.fetcher.query.ApiNamingRulesFetcher; import org.hypertrace.graphql.spanprocessing.fetcher.query.ExcludeSpanRulesFetcher; public interface SpanProcessingQuerySchema { String EXCLUDE_SPAN_RULES_QUERY_NAME = "excludeSpanRules"; - String API_NAMING_RULES_QUERY_NAME = "apiNamingRules"; @GraphQLField @GraphQLNonNull @GraphQLName(EXCLUDE_SPAN_RULES_QUERY_NAME) @GraphQLDataFetcher(ExcludeSpanRulesFetcher.class) ExcludeSpanRuleResultSet excludeSpanRules(); - - @GraphQLField - @GraphQLNonNull - @GraphQLName(API_NAMING_RULES_QUERY_NAME) - @GraphQLDataFetcher(ApiNamingRulesFetcher.class) - ApiNamingRuleResultSet apiNamingRules(); } diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRule.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRule.java deleted file mode 100644 index c88ddff3..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRule.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.schema.rule; - -import graphql.annotations.annotationTypes.GraphQLField; -import graphql.annotations.annotationTypes.GraphQLName; -import graphql.annotations.annotationTypes.GraphQLNonNull; -import java.time.Instant; -import org.hypertrace.core.graphql.common.schema.id.Identifiable; - -@GraphQLName(ApiNamingRule.TYPE_NAME) -public interface ApiNamingRule extends Identifiable, ApiNamingRuleInfo { - String TYPE_NAME = "ApiNamingRule"; - - String CREATION_TIME_KEY = "creationTime"; - String LAST_UPDATED_TIME_KEY = "lastUpdatedTime"; - - @GraphQLField - @GraphQLName(CREATION_TIME_KEY) - @GraphQLNonNull - Instant creationTime(); - - @GraphQLField - @GraphQLName(LAST_UPDATED_TIME_KEY) - @GraphQLNonNull - Instant lastUpdatedTime(); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRuleConfig.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRuleConfig.java deleted file mode 100644 index 7ddebd27..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRuleConfig.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.schema.rule; - -import graphql.annotations.annotationTypes.GraphQLField; -import graphql.annotations.annotationTypes.GraphQLName; -import graphql.annotations.annotationTypes.GraphQLNonNull; - -@GraphQLName(ApiNamingRuleConfig.TYPE_NAME) -public interface ApiNamingRuleConfig { - String TYPE_NAME = "ApiNamingRuleConfig"; - - String API_NAMING_RULE_CONFIG_TYPE = "apiNamingRuleConfigType"; - String SEGMENT_MATCHING_BASED_RULE_CONFIG_TYPE = "segmentMatchingBasedRuleConfig"; - - @GraphQLField - @GraphQLName(API_NAMING_RULE_CONFIG_TYPE) - @GraphQLNonNull - ApiNamingRuleConfigType apiNamingRuleConfigType(); - - @GraphQLField - @GraphQLName(SEGMENT_MATCHING_BASED_RULE_CONFIG_TYPE) - SegmentMatchingBasedRuleConfig segmentMatchingBasedRuleConfig(); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRuleConfigType.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRuleConfigType.java deleted file mode 100644 index 7e21b66c..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRuleConfigType.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.schema.rule; - -import graphql.annotations.annotationTypes.GraphQLName; - -@GraphQLName(ApiNamingRuleConfigType.TYPE_NAME) -public enum ApiNamingRuleConfigType { - SEGMENT_MATCHING; - static final String TYPE_NAME = "ApiNamingRuleConfigType"; -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRuleInfo.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRuleInfo.java deleted file mode 100644 index c4a4e3b8..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/ApiNamingRuleInfo.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.schema.rule; - -import graphql.annotations.annotationTypes.GraphQLField; -import graphql.annotations.annotationTypes.GraphQLName; -import graphql.annotations.annotationTypes.GraphQLNonNull; -import org.hypertrace.graphql.spanprocessing.schema.rule.filter.SpanProcessingRuleFilter; - -@GraphQLName(ApiNamingRuleInfo.TYPE_NAME) -public interface ApiNamingRuleInfo { - String TYPE_NAME = "ApiNamingRuleInfo"; - - String NAME_KEY = "name"; - String SPAN_FILTER_KEY = "spanFilter"; - String DISABLED_KEY = "disabled"; - String API_NAMING_RULE_CONFIG_KEY = "apiNamingRuleConfig"; - - @GraphQLField - @GraphQLName(NAME_KEY) - @GraphQLNonNull - String name(); - - @GraphQLField - @GraphQLName(SPAN_FILTER_KEY) - @GraphQLNonNull - SpanProcessingRuleFilter spanFilter(); - - @GraphQLField - @GraphQLName(API_NAMING_RULE_CONFIG_KEY) - @GraphQLNonNull - ApiNamingRuleConfig apiNamingRuleConfig(); - - @GraphQLField - @GraphQLName(DISABLED_KEY) - @GraphQLNonNull - boolean disabled(); -} diff --git a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/SegmentMatchingBasedRuleConfig.java b/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/SegmentMatchingBasedRuleConfig.java deleted file mode 100644 index be790856..00000000 --- a/hypertrace-graphql-span-processing-schema/src/main/java/org/hypertrace/graphql/spanprocessing/schema/rule/SegmentMatchingBasedRuleConfig.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.hypertrace.graphql.spanprocessing.schema.rule; - -import graphql.annotations.annotationTypes.GraphQLField; -import graphql.annotations.annotationTypes.GraphQLName; -import graphql.annotations.annotationTypes.GraphQLNonNull; -import java.util.List; - -@GraphQLName(SegmentMatchingBasedRuleConfig.TYPE_NAME) -public interface SegmentMatchingBasedRuleConfig { - String TYPE_NAME = "SegmentMatchingBasedRuleConfig"; - - String REGEXES_KEY = "regexes"; - String VALUES_KEY = "values"; - - @GraphQLField - @GraphQLName(REGEXES_KEY) - @GraphQLNonNull - List regexes(); - - @GraphQLField - @GraphQLName(VALUES_KEY) - @GraphQLNonNull - List values(); -}