diff --git a/alerting-config-service-api/gradle.lockfile b/alerting-config-service-api/gradle.lockfile index c94df8ab..dbb8740b 100644 --- a/alerting-config-service-api/gradle.lockfile +++ b/alerting-config-service-api/gradle.lockfile @@ -18,6 +18,6 @@ io.grpc:grpc-protobuf:1.60.0=compileClasspath,runtimeClasspath,testCompileClassp io.grpc:grpc-stub:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath javax.annotation:javax.annotation-api:1.3.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor diff --git a/alerting-config-service-impl/gradle.lockfile b/alerting-config-service-impl/gradle.lockfile index 697cb109..aef5a74a 100644 --- a/alerting-config-service-impl/gradle.lockfile +++ b/alerting-config-service-impl/gradle.lockfile @@ -43,7 +43,7 @@ org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testC org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-rx-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/config-proto-converter/gradle.lockfile b/config-proto-converter/gradle.lockfile index f53f0905..b8a11d95 100644 --- a/config-proto-converter/gradle.lockfile +++ b/config-proto-converter/gradle.lockfile @@ -18,6 +18,6 @@ io.grpc:grpc-bom:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,t io.grpc:grpc-protobuf-lite:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.grpc:grpc-protobuf:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor diff --git a/config-service-api/gradle.lockfile b/config-service-api/gradle.lockfile index d12c294a..39849309 100644 --- a/config-service-api/gradle.lockfile +++ b/config-service-api/gradle.lockfile @@ -33,7 +33,7 @@ net.bytebuddy:byte-buddy-agent:1.14.10=testRuntimeClasspath net.bytebuddy:byte-buddy:1.14.10=testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.mockito:mockito-core:5.8.0=testRuntimeClasspath diff --git a/config-service-change-event-api/gradle.lockfile b/config-service-change-event-api/gradle.lockfile index 8189ab7a..3a5ec96b 100644 --- a/config-service-change-event-api/gradle.lockfile +++ b/config-service-change-event-api/gradle.lockfile @@ -6,7 +6,7 @@ com.github.luben:zstd-jni:1.5.6-3=runtimeClasspath,testRuntimeClasspath com.google.protobuf:protobuf-java:3.25.5=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.grpc:grpc-bom:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.lz4:lz4-java:1.8.0=runtimeClasspath,testRuntimeClasspath org.slf4j:slf4j-api:2.0.7=runtimeClasspath,testRuntimeClasspath diff --git a/config-service-change-event-generator/gradle.lockfile b/config-service-change-event-generator/gradle.lockfile index 432b8a90..e6100407 100644 --- a/config-service-change-event-generator/gradle.lockfile +++ b/config-service-change-event-generator/gradle.lockfile @@ -39,7 +39,7 @@ org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0=testRuntimeClasspath org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/config-service-factory/gradle.lockfile b/config-service-factory/gradle.lockfile index 8184eb66..4a8a15c3 100644 --- a/config-service-factory/gradle.lockfile +++ b/config-service-factory/gradle.lockfile @@ -88,15 +88,15 @@ org.apache.httpcomponents:httpcore:4.4.13=runtimeClasspath,testRuntimeClasspath org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-http:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-io:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-security:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-server:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-servlet:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-util-ajax:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-util:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-http:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-io:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-security:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-server:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-servlet:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-util-ajax:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-util:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath org.hdrhistogram:HdrHistogram:2.1.12=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.documentstore:document-store:0.7.68=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-rx-utils:0.13.6=runtimeClasspath,testRuntimeClasspath @@ -105,11 +105,11 @@ org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=compileClasspath,runtime org.hypertrace.core.grpcutils:grpc-server-rx-utils:0.13.6=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-server-utils:0.13.6=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:docstore-metrics:0.1.79=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:platform-grpc-service-framework:0.1.79=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:platform-metrics:0.1.79=runtimeClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:platform-service-framework:0.1.79=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:service-framework-spi:0.1.79=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:docstore-metrics:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:platform-grpc-service-framework:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:platform-metrics:0.1.80=runtimeClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:platform-service-framework:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:service-framework-spi:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.latencyutils:LatencyUtils:2.0.3=runtimeClasspath,testRuntimeClasspath org.lz4:lz4-java:1.8.0=runtimeClasspath,testRuntimeClasspath org.mongodb:bson-record-codec:4.9.0=runtimeClasspath,testRuntimeClasspath diff --git a/config-service-factory/src/main/java/org/hypertrace/config/service/ConfigServiceFactory.java b/config-service-factory/src/main/java/org/hypertrace/config/service/ConfigServiceFactory.java index fb67c254..585a6695 100644 --- a/config-service-factory/src/main/java/org/hypertrace/config/service/ConfigServiceFactory.java +++ b/config-service-factory/src/main/java/org/hypertrace/config/service/ConfigServiceFactory.java @@ -18,6 +18,7 @@ import org.hypertrace.config.service.store.DocumentConfigStore; import org.hypertrace.core.documentstore.Datastore; import org.hypertrace.core.documentstore.DatastoreProvider; +import org.hypertrace.core.documentstore.model.config.TypesafeConfigDatastoreConfigExtractor; import org.hypertrace.core.serviceframework.docstore.metrics.DocStoreCustomMetricReportingConfig; import org.hypertrace.core.serviceframework.grpc.GrpcPlatformService; import org.hypertrace.core.serviceframework.grpc.GrpcPlatformServiceFactory; @@ -118,8 +119,7 @@ protected ConfigStore buildConfigStore( private Datastore initDataStore(Config config) { Config docStoreConfig = config.getConfig(DOC_STORE_CONFIG_KEY); - String dataStoreType = docStoreConfig.getString(DATA_STORE_TYPE); - Config dataStoreConfig = docStoreConfig.getConfig(dataStoreType); - return DatastoreProvider.getDatastore(dataStoreType, dataStoreConfig); + return DatastoreProvider.getDatastore( + TypesafeConfigDatastoreConfigExtractor.from(docStoreConfig, DATA_STORE_TYPE).extract()); } } diff --git a/config-service-impl/gradle.lockfile b/config-service-impl/gradle.lockfile index e7fe53a1..0fb70589 100644 --- a/config-service-impl/gradle.lockfile +++ b/config-service-impl/gradle.lockfile @@ -65,23 +65,23 @@ org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testC org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-http:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-io:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-security:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-server:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-servlet:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-util-ajax:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-util:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-http:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-io:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-security:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-server:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-servlet:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-util-ajax:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-util:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath org.hdrhistogram:HdrHistogram:2.1.12=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.documentstore:document-store:0.7.68=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-utils:0.13.6=testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:docstore-metrics:0.1.79=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:platform-metrics:0.1.79=runtimeClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:service-framework-spi:0.1.79=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:docstore-metrics:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:platform-metrics:0.1.80=runtimeClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:service-framework-spi:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-api:5.10.0=testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-engine:5.10.0=testRuntimeClasspath org.junit.jupiter:junit-jupiter-params:5.10.0=testCompileClasspath,testRuntimeClasspath diff --git a/config-service/gradle.lockfile b/config-service/gradle.lockfile index ed7cb440..c89cd675 100644 --- a/config-service/gradle.lockfile +++ b/config-service/gradle.lockfile @@ -91,15 +91,15 @@ org.apache.logging.log4j:log4j-core:2.20.0=runtimeClasspath,testRuntimeClasspath org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0=runtimeClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-http:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-io:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-security:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-server:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-servlet:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-util-ajax:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath -org.eclipse.jetty:jetty-util:9.4.53.v20231009=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-http:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-io:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-security:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-server:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-servlet:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-util-ajax:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-util:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath org.hdrhistogram:HdrHistogram:2.1.12=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.documentstore:document-store:0.7.68=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-rx-utils:0.13.6=runtimeClasspath,testRuntimeClasspath @@ -108,11 +108,11 @@ org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=runtimeClasspath,testRun org.hypertrace.core.grpcutils:grpc-server-rx-utils:0.13.6=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-server-utils:0.13.6=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:docstore-metrics:0.1.79=runtimeClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:platform-grpc-service-framework:0.1.79=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:platform-metrics:0.1.79=runtimeClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:platform-service-framework:0.1.79=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.core.serviceframework:service-framework-spi:0.1.79=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:docstore-metrics:0.1.80=runtimeClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:platform-grpc-service-framework:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:platform-metrics:0.1.80=runtimeClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:platform-service-framework:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:service-framework-spi:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.latencyutils:LatencyUtils:2.0.3=runtimeClasspath,testRuntimeClasspath org.lz4:lz4-java:1.8.0=runtimeClasspath,testRuntimeClasspath org.mongodb:bson-record-codec:4.9.0=runtimeClasspath,testRuntimeClasspath diff --git a/config-service/src/integrationTest/resources/configs/config-service/application.conf b/config-service/src/integrationTest/resources/configs/config-service/application.conf index 5f2e53bb..18fde652 100644 --- a/config-service/src/integrationTest/resources/configs/config-service/application.conf +++ b/config-service/src/integrationTest/resources/configs/config-service/application.conf @@ -6,12 +6,22 @@ service.admin.port = 50102 generic.config.service { document.store { - dataStoreType = mongo - mongo { - host = localhost - host = ${?MONGO_HOST} # provides a way to override the mongo_host via an environment variable - port = 37017 - } + appName = config-service-test + maxPoolSize = 10 + dataStoreType = mongo + mongo { + database = default_db + user = ${?MONGO_SERVICE_USERNAME} + password = ${?MONGO_SERVICE_USER_PASSWORD} + endpoints = [ + { + host = localhost + host = ${?MONGO_HOST} # provides a way to override the mongo_host via an environment variable + port = 37017 + port = ${?MONGO_PORT} + } + ] + } } publish.change.events = false } diff --git a/config-service/src/main/resources/configs/common/application.conf b/config-service/src/main/resources/configs/common/application.conf index 7366b659..68bfc4da 100644 --- a/config-service/src/main/resources/configs/common/application.conf +++ b/config-service/src/main/resources/configs/common/application.conf @@ -5,12 +5,22 @@ service.admin.port = 50102 generic.config.service { document.store { - dataStoreType = mongo - mongo { - host = localhost - host = ${?MONGO_HOST} # provides a way to override the mongo_host via an environment variable - port = 27017 - } + appName = config-service-local + maxPoolSize = 10 + dataStoreType = mongo + mongo { + database = default_db + user = ${?MONGO_SERVICE_USERNAME} + password = ${?MONGO_SERVICE_USER_PASSWORD} + endpoints = [ + { + host = localhost + host = ${?MONGO_HOST} # provides a way to override the mongo_host via an environment variable + port = 27017 + port = ${?MONGO_PORT} + } + ] + } } publish.change.events = false } diff --git a/helm/templates/config-service-config.yaml b/helm/templates/config-service-config.yaml index cc04bed9..1235cef7 100644 --- a/helm/templates/config-service-config.yaml +++ b/helm/templates/config-service-config.yaml @@ -11,15 +11,29 @@ data: generic.config.service { document.store { - {{- $dst := .Values.configServiceConfig.dataStoreType }} + {{- if .Values.database }} + {{- $dst := .Values.database.type }} dataStoreType = {{ $dst }} + appName = {{ .Values.service.name }} + + {{- range $key, $value := (index .Values "database") }} + {{- if ne $key $dst }} + {{ $key }} = {{- toJson $value }} + {{- end }} + {{- end }} + {{ $dst }} { - {{- range $key, $value := (index .Values "configServiceConfig" (printf "%s" $dst)) }} + {{- range $key, $value := (index .Values "database" (printf "%s" $dst)) }} {{- if $value }} - {{ $key }} = {{ $value | quote }} + {{- if hasPrefix "${?" (printf "%s" $value) }} + {{ $key }} = {{ $value }} + {{- else }} + {{ $key }} = {{- toJson $value }} + {{- end }} {{- end }} {{- end }} } + {{- end }} } publish.change.events = {{ .Values.configServiceConfig.publishChangeEvents }} } diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 0a3875e5..065eed07 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -64,6 +64,20 @@ spec: value: "/var/{{ .Chart.Name }}/log/log4j2.properties" - name: JAVA_OPTS value: {{ .Values.javaOpts | quote }} + {{- if and .Values.database .Values.database.mongo.authEnabled }} + {{- with .Values.database.mongo.credentials }} + - name: MONGO_SERVICE_USERNAME + valueFrom: + secretKeyRef: + name: {{ .secretName }} + key: {{ .secretUsernameKey }} + - name: MONGO_SERVICE_USER_PASSWORD + valueFrom: + secretKeyRef: + name: {{.secretName }} + key: {{.secretPasswordKey }} + {{- end }} + {{- end }} volumeMounts: - name: service-config mountPath: /app/resources/configs/{{ .Chart.Name }}/application.conf diff --git a/helm/values.yaml b/helm/values.yaml index 146effbf..ce52eefe 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -28,6 +28,7 @@ containerAdminPort: 50102 service: type: ClusterIP port: 50101 + name: hypertrace-config-service nodeLabels: {} @@ -80,10 +81,6 @@ serviceSelectorLabels: configServiceConfig: name: config-service-config publishChangeEvents: false - dataStoreType: "mongo" - mongo: - host: mongo - url: "" partitionerServiceConfig: defaultProfiles: diff --git a/label-application-rule-config-service-api/gradle.lockfile b/label-application-rule-config-service-api/gradle.lockfile index c94df8ab..dbb8740b 100644 --- a/label-application-rule-config-service-api/gradle.lockfile +++ b/label-application-rule-config-service-api/gradle.lockfile @@ -18,6 +18,6 @@ io.grpc:grpc-protobuf:1.60.0=compileClasspath,runtimeClasspath,testCompileClassp io.grpc:grpc-stub:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath javax.annotation:javax.annotation-api:1.3.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor diff --git a/label-application-rule-config-service-impl/gradle.lockfile b/label-application-rule-config-service-impl/gradle.lockfile index 1dc0bef3..0ca038b7 100644 --- a/label-application-rule-config-service-impl/gradle.lockfile +++ b/label-application-rule-config-service-impl/gradle.lockfile @@ -43,7 +43,7 @@ org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testC org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/labels-config-service-api/gradle.lockfile b/labels-config-service-api/gradle.lockfile index c94df8ab..dbb8740b 100644 --- a/labels-config-service-api/gradle.lockfile +++ b/labels-config-service-api/gradle.lockfile @@ -18,6 +18,6 @@ io.grpc:grpc-protobuf:1.60.0=compileClasspath,runtimeClasspath,testCompileClassp io.grpc:grpc-stub:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath javax.annotation:javax.annotation-api:1.3.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor diff --git a/labels-config-service-impl/gradle.lockfile b/labels-config-service-impl/gradle.lockfile index ae2e1fe6..d79d8705 100644 --- a/labels-config-service-impl/gradle.lockfile +++ b/labels-config-service-impl/gradle.lockfile @@ -43,7 +43,7 @@ org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testC org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-rx-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/notification-channel-config-service-api/gradle.lockfile b/notification-channel-config-service-api/gradle.lockfile index c94df8ab..dbb8740b 100644 --- a/notification-channel-config-service-api/gradle.lockfile +++ b/notification-channel-config-service-api/gradle.lockfile @@ -18,6 +18,6 @@ io.grpc:grpc-protobuf:1.60.0=compileClasspath,runtimeClasspath,testCompileClassp io.grpc:grpc-stub:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath javax.annotation:javax.annotation-api:1.3.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor diff --git a/notification-channel-config-service-impl/gradle.lockfile b/notification-channel-config-service-impl/gradle.lockfile index f8e05617..3a533a2c 100644 --- a/notification-channel-config-service-impl/gradle.lockfile +++ b/notification-channel-config-service-impl/gradle.lockfile @@ -43,7 +43,7 @@ org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testC org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/notification-rule-config-service-api/gradle.lockfile b/notification-rule-config-service-api/gradle.lockfile index c94df8ab..dbb8740b 100644 --- a/notification-rule-config-service-api/gradle.lockfile +++ b/notification-rule-config-service-api/gradle.lockfile @@ -18,6 +18,6 @@ io.grpc:grpc-protobuf:1.60.0=compileClasspath,runtimeClasspath,testCompileClassp io.grpc:grpc-stub:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath javax.annotation:javax.annotation-api:1.3.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor diff --git a/notification-rule-config-service-impl/gradle.lockfile b/notification-rule-config-service-impl/gradle.lockfile index 48e7e6e4..cbe07d1a 100644 --- a/notification-rule-config-service-impl/gradle.lockfile +++ b/notification-rule-config-service-impl/gradle.lockfile @@ -42,7 +42,7 @@ org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testC org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/object-store/gradle.lockfile b/object-store/gradle.lockfile index 80eda730..d6a93af2 100644 --- a/object-store/gradle.lockfile +++ b/object-store/gradle.lockfile @@ -39,7 +39,7 @@ org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testC org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/partitioner-config-service-api/gradle.lockfile b/partitioner-config-service-api/gradle.lockfile index c94df8ab..dbb8740b 100644 --- a/partitioner-config-service-api/gradle.lockfile +++ b/partitioner-config-service-api/gradle.lockfile @@ -18,6 +18,6 @@ io.grpc:grpc-protobuf:1.60.0=compileClasspath,runtimeClasspath,testCompileClassp io.grpc:grpc-stub:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath javax.annotation:javax.annotation-api:1.3.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor diff --git a/partitioner-config-service-impl/build.gradle.kts b/partitioner-config-service-impl/build.gradle.kts index c8007151..9c39ac9b 100644 --- a/partitioner-config-service-impl/build.gradle.kts +++ b/partitioner-config-service-impl/build.gradle.kts @@ -12,6 +12,8 @@ dependencies { implementation(commonLibs.slf4j2.api) implementation(commonLibs.typesafe.config) implementation(commonLibs.hypertrace.documentstore) + implementation(commonLibs.hypertrace.framework.grpc) + implementation(commonLibs.hypertrace.framework.documentstore.metrics) annotationProcessor(commonLibs.lombok) compileOnly(commonLibs.lombok) diff --git a/partitioner-config-service-impl/gradle.lockfile b/partitioner-config-service-impl/gradle.lockfile index 217c45f8..f7623266 100644 --- a/partitioner-config-service-impl/gradle.lockfile +++ b/partitioner-config-service-impl/gradle.lockfile @@ -2,17 +2,17 @@ # Manual edits can break the build and are not advised. # This file is expected to be part of source control. aopalliance:aopalliance:1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.auth0:java-jwt:4.4.0=testRuntimeClasspath -com.auth0:jwks-rsa:0.22.0=testRuntimeClasspath +com.auth0:java-jwt:4.4.0=runtimeClasspath,testRuntimeClasspath +com.auth0:jwks-rsa:0.22.0=runtimeClasspath,testRuntimeClasspath com.fasterxml.jackson.core:jackson-annotations:2.16.1=runtimeClasspath,testRuntimeClasspath com.fasterxml.jackson.core:jackson-core:2.16.1=runtimeClasspath,testRuntimeClasspath com.fasterxml.jackson.core:jackson-databind:2.16.1=runtimeClasspath,testRuntimeClasspath com.fasterxml.jackson:jackson-bom:2.16.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.android:annotations:4.1.1.4=testRuntimeClasspath +com.google.android:annotations:4.1.1.4=runtimeClasspath,testRuntimeClasspath com.google.api.grpc:proto-google-common-protos:2.22.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.google.code.findbugs:jsr305:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.google.code.gson:gson:2.10.1=testRuntimeClasspath -com.google.code.gson:gson:2.8.9=compileClasspath,runtimeClasspath,testCompileClasspath +com.google.code.gson:gson:2.10.1=runtimeClasspath,testRuntimeClasspath +com.google.code.gson:gson:2.8.9=compileClasspath,testCompileClasspath com.google.errorprone:error_prone_annotations:2.20.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.google.guava:failureaccess:1.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.google.guava:guava-parent:32.1.2-jre=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath @@ -22,20 +22,57 @@ com.google.inject:guice:7.0.0=compileClasspath,runtimeClasspath,testCompileClass com.google.j2objc:j2objc-annotations:2.8=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.google.protobuf:protobuf-java-util:3.25.5=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.google.protobuf:protobuf-java:3.25.5=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.helger:profiler:1.1.1=runtimeClasspath,testRuntimeClasspath com.typesafe:config:1.4.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +commons-codec:commons-codec:1.15=runtimeClasspath,testRuntimeClasspath commons-logging:commons-logging:1.2=runtimeClasspath,testRuntimeClasspath +io.dropwizard.metrics:metrics-core:4.2.16=runtimeClasspath,testRuntimeClasspath +io.dropwizard.metrics:metrics-healthchecks:4.2.16=runtimeClasspath,testRuntimeClasspath +io.dropwizard.metrics:metrics-json:4.2.16=runtimeClasspath,testRuntimeClasspath +io.dropwizard.metrics:metrics-jvm:4.2.16=runtimeClasspath,testRuntimeClasspath +io.dropwizard.metrics:metrics-servlets:4.2.16=runtimeClasspath,testRuntimeClasspath +io.github.mweirauch:micrometer-jvm-extras:0.2.2=runtimeClasspath,testRuntimeClasspath io.grpc:grpc-api:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.grpc:grpc-bom:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.grpc:grpc-context:1.60.0=testRuntimeClasspath -io.grpc:grpc-core:1.60.0=testRuntimeClasspath -io.grpc:grpc-inprocess:1.60.0=testRuntimeClasspath +io.grpc:grpc-context:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.grpc:grpc-core:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.grpc:grpc-inprocess:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.grpc:grpc-netty:1.60.0=runtimeClasspath,testRuntimeClasspath io.grpc:grpc-protobuf-lite:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.grpc:grpc-protobuf:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.grpc:grpc-services:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.grpc:grpc-stub:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.grpc:grpc-util:1.60.0=testRuntimeClasspath -io.perfmark:perfmark-api:0.26.0=testRuntimeClasspath +io.grpc:grpc-util:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.micrometer:micrometer-commons:1.10.2=runtimeClasspath,testRuntimeClasspath +io.micrometer:micrometer-core:1.10.2=runtimeClasspath,testRuntimeClasspath +io.micrometer:micrometer-observation:1.10.2=runtimeClasspath,testRuntimeClasspath +io.micrometer:micrometer-registry-prometheus:1.10.2=runtimeClasspath,testRuntimeClasspath +io.netty:netty-bom:4.1.108.Final=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.netty:netty-buffer:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.netty:netty-codec-http2:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.netty:netty-codec-http:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.netty:netty-codec-socks:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.netty:netty-codec:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.netty:netty-common:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.netty:netty-handler-proxy:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.netty:netty-handler:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.netty:netty-resolver:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.netty:netty-transport-native-unix-common:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.netty:netty-transport:4.1.108.Final=runtimeClasspath,testRuntimeClasspath +io.perfmark:perfmark-api:0.26.0=runtimeClasspath,testRuntimeClasspath +io.prometheus:simpleclient:0.16.0=runtimeClasspath,testRuntimeClasspath +io.prometheus:simpleclient_common:0.16.0=runtimeClasspath,testRuntimeClasspath +io.prometheus:simpleclient_dropwizard:0.12.0=runtimeClasspath,testRuntimeClasspath +io.prometheus:simpleclient_pushgateway:0.12.0=runtimeClasspath,testRuntimeClasspath +io.prometheus:simpleclient_servlet:0.12.0=runtimeClasspath,testRuntimeClasspath +io.prometheus:simpleclient_servlet_common:0.12.0=runtimeClasspath,testRuntimeClasspath +io.prometheus:simpleclient_tracer_common:0.16.0=runtimeClasspath,testRuntimeClasspath +io.prometheus:simpleclient_tracer_otel:0.16.0=runtimeClasspath,testRuntimeClasspath +io.prometheus:simpleclient_tracer_otel_agent:0.16.0=runtimeClasspath,testRuntimeClasspath jakarta.inject:jakarta.inject-api:2.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath javax.annotation:javax.annotation-api:1.3.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +javax.servlet:javax.servlet-api:3.1.0=runtimeClasspath,testRuntimeClasspath +javax.xml.bind:jaxb-api:2.3.0=runtimeClasspath,testRuntimeClasspath net.bytebuddy:byte-buddy-agent:1.14.10=testCompileClasspath,testRuntimeClasspath net.bytebuddy:byte-buddy:1.14.10=testCompileClasspath,testRuntimeClasspath net.jodah:failsafe:2.4.4=runtimeClasspath,testRuntimeClasspath @@ -43,13 +80,30 @@ org.apache.commons:commons-collections4:4.4=runtimeClasspath,testRuntimeClasspat org.apache.commons:commons-dbcp2:2.9.0=runtimeClasspath,testRuntimeClasspath org.apache.commons:commons-lang3:3.12.0=runtimeClasspath,testRuntimeClasspath org.apache.commons:commons-pool2:2.10.0=runtimeClasspath,testRuntimeClasspath +org.apache.httpcomponents:httpclient:4.5.13=runtimeClasspath,testRuntimeClasspath +org.apache.httpcomponents:httpcore:4.4.13=runtimeClasspath,testRuntimeClasspath org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.codehaus.mojo:animal-sniffer-annotations:1.23=testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-http:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-io:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-security:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-server:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-servlet:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-util-ajax:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.eclipse.jetty:jetty-util:9.4.56.v20240826=runtimeClasspath,testRuntimeClasspath +org.hdrhistogram:HdrHistogram:2.1.12=runtimeClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.documentstore:document-store:0.7.68=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=testRuntimeClasspath +org.hypertrace.core.grpcutils:grpc-client-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=runtimeClasspath,testRuntimeClasspath +org.hypertrace.core.grpcutils:grpc-server-utils:0.13.6=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:docstore-metrics:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:platform-grpc-service-framework:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:platform-metrics:0.1.80=runtimeClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:platform-service-framework:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.core.serviceframework:service-framework-spi:0.1.80=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-api:5.10.0=testCompileClasspath org.junit.jupiter:junit-jupiter-api:5.10.1=testRuntimeClasspath org.junit.jupiter:junit-jupiter-engine:5.10.1=testRuntimeClasspath @@ -62,6 +116,7 @@ org.junit.platform:junit-platform-commons:1.10.1=testRuntimeClasspath org.junit.platform:junit-platform-engine:1.10.1=testRuntimeClasspath org.junit:junit-bom:5.10.0=testCompileClasspath org.junit:junit-bom:5.10.1=testRuntimeClasspath +org.latencyutils:LatencyUtils:2.0.3=runtimeClasspath,testRuntimeClasspath org.mockito:mockito-core:5.8.0=testCompileClasspath,testRuntimeClasspath org.mockito:mockito-junit-jupiter:5.8.0=testCompileClasspath,testRuntimeClasspath org.mongodb:bson-record-codec:4.9.0=runtimeClasspath,testRuntimeClasspath diff --git a/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/DBMetricsReporter.java b/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/DBMetricsReporter.java new file mode 100644 index 00000000..7dd4b562 --- /dev/null +++ b/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/DBMetricsReporter.java @@ -0,0 +1,19 @@ +package org.hypertrace.partitioner.config.service; + +import org.hypertrace.core.documentstore.Datastore; +import org.hypertrace.core.serviceframework.docstore.metrics.DocStoreMetricsRegistry; +import org.hypertrace.core.serviceframework.spi.PlatformServiceLifecycle; + +public class DBMetricsReporter { + private final DocStoreMetricsRegistry metricsRegistry; + + public DBMetricsReporter( + final Datastore datastore, final PlatformServiceLifecycle platformServiceLifecycle) { + metricsRegistry = + new DocStoreMetricsRegistry(datastore).withPlatformLifecycle(platformServiceLifecycle); + } + + public void monitor() { + metricsRegistry.monitor(); + } +} diff --git a/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/PartitionerConfigServiceFactory.java b/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/PartitionerConfigServiceFactory.java index 911b65cb..a696dd5e 100644 --- a/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/PartitionerConfigServiceFactory.java +++ b/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/PartitionerConfigServiceFactory.java @@ -4,10 +4,18 @@ import com.google.inject.Injector; import com.typesafe.config.Config; import io.grpc.BindableService; +import org.hypertrace.core.serviceframework.spi.PlatformServiceLifecycle; public class PartitionerConfigServiceFactory { + + @Deprecated public static BindableService build(Config config) { Injector injector = Guice.createInjector(new PartitionerConfigServiceModule(config)); return injector.getInstance(BindableService.class); } + + public static BindableService build(Config config, PlatformServiceLifecycle lifecycle) { + Injector injector = Guice.createInjector(new PartitionerConfigServiceModule(config, lifecycle)); + return injector.getInstance(BindableService.class); + } } diff --git a/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/PartitionerConfigServiceModule.java b/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/PartitionerConfigServiceModule.java index 512a4597..56897bfe 100644 --- a/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/PartitionerConfigServiceModule.java +++ b/partitioner-config-service-impl/src/main/java/org/hypertrace/partitioner/config/service/PartitionerConfigServiceModule.java @@ -5,6 +5,8 @@ import io.grpc.BindableService; import org.hypertrace.core.documentstore.Datastore; import org.hypertrace.core.documentstore.DatastoreProvider; +import org.hypertrace.core.documentstore.model.config.TypesafeConfigDatastoreConfigExtractor; +import org.hypertrace.core.serviceframework.spi.PlatformServiceLifecycle; import org.hypertrace.partitioner.config.service.store.PartitionerProfilesDocumentStore; import org.hypertrace.partitioner.config.service.store.PartitionerProfilesStore; @@ -16,24 +18,34 @@ public class PartitionerConfigServiceModule extends AbstractModule { public static final String PARTITIONER_CONFIG_SERVICE = "partitioner.config.service"; private final Config config; + private PlatformServiceLifecycle lifecycle; + @Deprecated public PartitionerConfigServiceModule(Config config) { this.config = config; } + public PartitionerConfigServiceModule(Config config, PlatformServiceLifecycle lifecycle) { + this.config = config; + this.lifecycle = lifecycle; + } + @Override protected void configure() { bind(BindableService.class).to(PartitionerConfigServiceImpl.class); - bind(PartitionerProfilesStore.class).toInstance(getDocumentStore(config)); + bind(PartitionerProfilesStore.class).toInstance(getDocumentStore(config, lifecycle)); } - private PartitionerProfilesDocumentStore getDocumentStore(Config config) { + private PartitionerProfilesDocumentStore getDocumentStore( + Config config, PlatformServiceLifecycle lifecycle) { Config genericConfig = config.getConfig(GENERIC_CONFIG_SERVICE); Config docStoreConfig = genericConfig.getConfig(DOC_STORE_CONFIG_KEY); - String dataStoreType = docStoreConfig.getString(DATA_STORE_TYPE); - Config dataStoreConfig = docStoreConfig.getConfig(dataStoreType); Config partitionerConfig = config.getConfig(PARTITIONER_CONFIG_SERVICE); - Datastore datastore = DatastoreProvider.getDatastore(dataStoreType, dataStoreConfig); + Datastore datastore = + DatastoreProvider.getDatastore( + TypesafeConfigDatastoreConfigExtractor.from(docStoreConfig, DATA_STORE_TYPE).extract()); + new DBMetricsReporter(datastore, lifecycle).monitor(); + lifecycle.shutdownComplete().thenRun(datastore::close); return new PartitionerProfilesDocumentStore(datastore, partitionerConfig); } } diff --git a/spaces-config-service-api/gradle.lockfile b/spaces-config-service-api/gradle.lockfile index c94df8ab..dbb8740b 100644 --- a/spaces-config-service-api/gradle.lockfile +++ b/spaces-config-service-api/gradle.lockfile @@ -18,6 +18,6 @@ io.grpc:grpc-protobuf:1.60.0=compileClasspath,runtimeClasspath,testCompileClassp io.grpc:grpc-stub:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath javax.annotation:javax.annotation-api:1.3.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor diff --git a/spaces-config-service-impl/gradle.lockfile b/spaces-config-service-impl/gradle.lockfile index 0b8bddea..92816c93 100644 --- a/spaces-config-service-impl/gradle.lockfile +++ b/spaces-config-service-impl/gradle.lockfile @@ -37,7 +37,7 @@ net.bytebuddy:byte-buddy:1.14.10=testCompileClasspath,testRuntimeClasspath org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-rx-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/span-processing-config-service-api/gradle.lockfile b/span-processing-config-service-api/gradle.lockfile index c94df8ab..dbb8740b 100644 --- a/span-processing-config-service-api/gradle.lockfile +++ b/span-processing-config-service-api/gradle.lockfile @@ -18,6 +18,6 @@ io.grpc:grpc-protobuf:1.60.0=compileClasspath,runtimeClasspath,testCompileClassp io.grpc:grpc-stub:1.60.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath javax.annotation:javax.annotation-api:1.3.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor diff --git a/span-processing-config-service-impl/gradle.lockfile b/span-processing-config-service-impl/gradle.lockfile index d3110597..bf351ff9 100644 --- a/span-processing-config-service-impl/gradle.lockfile +++ b/span-processing-config-service-impl/gradle.lockfile @@ -46,7 +46,7 @@ org.apache.kafka:kafka-clients:7.7.0-ccs=compileClasspath,runtimeClasspath,testC org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.eventstore:event-store:0.1.4=runtimeClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-client-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath diff --git a/span-processing-utils/gradle.lockfile b/span-processing-utils/gradle.lockfile index 9ef83ae6..9e05800f 100644 --- a/span-processing-utils/gradle.lockfile +++ b/span-processing-utils/gradle.lockfile @@ -35,7 +35,7 @@ net.bytebuddy:byte-buddy:1.14.10=testCompileClasspath,testRuntimeClasspath org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-api:5.10.0=testCompileClasspath diff --git a/validation-utils/gradle.lockfile b/validation-utils/gradle.lockfile index 2b98886f..6cea6ff4 100644 --- a/validation-utils/gradle.lockfile +++ b/validation-utils/gradle.lockfile @@ -29,7 +29,7 @@ io.grpc:grpc-util:1.60.0=runtimeClasspath,testRuntimeClasspath io.perfmark:perfmark-api:0.26.0=runtimeClasspath,testRuntimeClasspath org.checkerframework:checker-qual:3.33.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath -org.hypertrace.bom:hypertrace-bom:0.3.32=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.hypertrace.bom:hypertrace-bom:0.3.34=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.grpcutils:grpc-context-utils:0.13.6=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.hypertrace.core.kafkastreams.framework:kafka-bom:0.5.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.slf4j:slf4j-api:2.0.7=runtimeClasspath,testRuntimeClasspath