From e8f78a491a599e996a07ef9a2e002be95b925cc0 Mon Sep 17 00:00:00 2001 From: Richard Salac Date: Tue, 4 Nov 2025 19:43:44 +0100 Subject: [PATCH] enable opentelemetry for modulith only Signed-off-by: Richard Salac --- api-catalog-package/src/main/resources/bin/start.sh | 1 + api-catalog-services/src/main/resources/application.yml | 4 ++++ apiml/build.gradle | 1 + apiml/src/main/resources/application.yml | 5 +++++ caching-service-package/src/main/resources/bin/start.sh | 1 + caching-service/src/main/resources/application.yml | 5 +++++ discovery-package/src/main/resources/bin/start.sh | 1 + discovery-service/src/main/resources/application.yml | 4 ++++ gateway-package/src/main/resources/bin/start.sh | 1 + gateway-service/src/main/resources/application.yml | 4 ++++ gradle/versions.gradle | 2 ++ zaas-package/src/main/resources/bin/start.sh | 1 + zaas-service/src/main/resources/application.yml | 4 ++++ 13 files changed, 34 insertions(+) diff --git a/api-catalog-package/src/main/resources/bin/start.sh b/api-catalog-package/src/main/resources/bin/start.sh index 8681c7da3a..464ab3015a 100755 --- a/api-catalog-package/src/main/resources/bin/start.sh +++ b/api-catalog-package/src/main/resources/bin/start.sh @@ -332,6 +332,7 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${CATALOG_CODE} ${JAVA_BIN_DIR}java \ -Dloader.path=${COMMON_LIB} \ -Djava.library.path=${LIBPATH} \ -Djavax.net.debug=${ZWE_configs_sslDebug:-""} \ + -Dotel.sdk.disabled=true \ -jar "${JAR_FILE}" & pid=$! echo "pid=${pid}" diff --git a/api-catalog-services/src/main/resources/application.yml b/api-catalog-services/src/main/resources/application.yml index 1d21f8c0b6..f57ba68502 100644 --- a/api-catalog-services/src/main/resources/application.yml +++ b/api-catalog-services/src/main/resources/application.yml @@ -22,6 +22,10 @@ spring: profiles.group: dev: debug, diag +otel: + sdk: + disabled: true + springdoc: packagesToScan: org.zowe.apiml.apicatalog.controllers.api api-docs: diff --git a/apiml/build.gradle b/apiml/build.gradle index 61d8e4497a..42237884e3 100644 --- a/apiml/build.gradle +++ b/apiml/build.gradle @@ -74,6 +74,7 @@ dependencies { implementation libs.nimbus.jose.jwt implementation libs.spring.doc.webflux.ui implementation libs.jose4j.jwt // Signing, with support for JCA with ICSF + implementation libs.opentelemetry.spring.boot.starter testImplementation(testFixtures(project(":apiml-common"))) testImplementation(testFixtures(project(":gateway-service"))) diff --git a/apiml/src/main/resources/application.yml b/apiml/src/main/resources/application.yml index b2bc6fa823..f791b58f2a 100644 --- a/apiml/src/main/resources/application.yml +++ b/apiml/src/main/resources/application.yml @@ -39,6 +39,10 @@ spring: web-application-type: reactive allow-bean-definition-overriding: true +otel: + sdk: + disabled: true + springdoc: api-docs: path: /v3/api-docs @@ -319,6 +323,7 @@ management: base-path: /application exposure: include: health,info + --- spring.config.activate.on-profile: debug diff --git a/caching-service-package/src/main/resources/bin/start.sh b/caching-service-package/src/main/resources/bin/start.sh index 1a76571661..8a1ca5ca69 100755 --- a/caching-service-package/src/main/resources/bin/start.sh +++ b/caching-service-package/src/main/resources/bin/start.sh @@ -299,6 +299,7 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${CACHING_CODE} ${JAVA_BIN_DIR}java \ -Djava.net.preferIPv4Stack=true \ -Djavax.net.debug=${ZWE_configs_sslDebug:-""} \ -Djava.library.path=${LIBPATH} \ + -Dotel.sdk.disabled=true \ -jar "${JAR_FILE}" & pid=$! echo "pid=${pid}" diff --git a/caching-service/src/main/resources/application.yml b/caching-service/src/main/resources/application.yml index b21426c905..79f22e8ae7 100644 --- a/caching-service/src/main/resources/application.yml +++ b/caching-service/src/main/resources/application.yml @@ -125,6 +125,11 @@ spring: banner-mode: ${apiml.banner:"off"} web-application-type: reactive allow-bean-definition-overriding: true + +otel: + sdk: + disabled: true + springdoc: pathsToMatch: /api/v1/** api-docs: diff --git a/discovery-package/src/main/resources/bin/start.sh b/discovery-package/src/main/resources/bin/start.sh index 89ef4bd716..f3806f2abd 100755 --- a/discovery-package/src/main/resources/bin/start.sh +++ b/discovery-package/src/main/resources/bin/start.sh @@ -307,6 +307,7 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${DISCOVERY_CODE} ${JAVA_BIN_DIR}java \ -Dserver.ssl.trustStorePassword="${truststore_pass}" \ -Dserver.ssl.trustStoreType="${truststore_type}" \ -Dspring.profiles.active=${ZWE_configs_spring_profiles_active:-} \ + -Dotel.sdk.disabled=true \ -jar "${JAR_FILE}" & pid=$! echo "pid=${pid}" diff --git a/discovery-service/src/main/resources/application.yml b/discovery-service/src/main/resources/application.yml index 31ddfe640d..a7db48734f 100644 --- a/discovery-service/src/main/resources/application.yml +++ b/discovery-service/src/main/resources/application.yml @@ -65,6 +65,10 @@ spring: profiles.group: dev: debug, diag +otel: + sdk: + disabled: true + server: address: ${apiml.service.ipAddress} port: ${apiml.service.port} diff --git a/gateway-package/src/main/resources/bin/start.sh b/gateway-package/src/main/resources/bin/start.sh index 429b6b05b7..04484f3d3a 100755 --- a/gateway-package/src/main/resources/bin/start.sh +++ b/gateway-package/src/main/resources/bin/start.sh @@ -376,6 +376,7 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${GATEWAY_CODE} ${JAVA_BIN_DIR}java \ -Dspring.profiles.active=${ZWE_configs_spring_profiles_active:-} \ -Dapiml.security.rauditx.onOidcUserIsMapped=${ZWE_configs_apiml_security_rauditx_onOidcUserIsMapped:-false} \ -Dapiml.security.rauditx.oidcSourceUserPaths=${ZWE_configs_apiml_security_rauditx_oidcSourceUserPaths:-sub} \ + -Dotel.sdk.disabled=true \ -jar "${JAR_FILE}" & pid=$! diff --git a/gateway-service/src/main/resources/application.yml b/gateway-service/src/main/resources/application.yml index dd169dc383..746a63594e 100644 --- a/gateway-service/src/main/resources/application.yml +++ b/gateway-service/src/main/resources/application.yml @@ -73,6 +73,10 @@ spring: banner-mode: ${apiml.banner:"off"} web-application-type: reactive +otel: + sdk: + disabled: true + springdoc: api-docs: path: /gateway/api-docs diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 0abcb34500..9a4d40968c 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -48,6 +48,7 @@ dependencyResolutionManagement { version('jakartaInject', '2.0.1') version('jakartaServlet', '6.1.0') version('javaxAnnotation', '1.3.2') + version('openTelemetry-starter', '2.20.1') // Eureka requires this specific version of Jakarta JAXB bindings version('jaxbApi') { @@ -247,6 +248,7 @@ dependencyResolutionManagement { library('spring_boot_starter_graphql', 'org.springframework.boot', 'spring-boot-starter-graphql').versionRef('springBootGraphQl') library('bucket4j_core', 'com.bucket4j', 'bucket4j_jdk17-core').versionRef('bucket4j') library('xstren', 'com.thoughtworks.xstream', 'xstream').versionRef('xstream') // to avoid security vulnerability CVE-2024-47072 + library('opentelemetry_spring_boot_starter', 'io.opentelemetry.instrumentation','opentelemetry-spring-boot-starter').versionRef('openTelemetry-starter') // Sample apps only library('jersey_client4', 'com.sun.jersey.contribs', 'jersey-apache-client4').versionRef('jerseySun') diff --git a/zaas-package/src/main/resources/bin/start.sh b/zaas-package/src/main/resources/bin/start.sh index 4656211743..2a1ca56b91 100755 --- a/zaas-package/src/main/resources/bin/start.sh +++ b/zaas-package/src/main/resources/bin/start.sh @@ -391,6 +391,7 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${ZAAS_CODE} ${JAVA_BIN_DIR}java \ -Dloader.path=${ZAAS_LOADER_PATH} \ -Djava.library.path=${LIBPATH} \ -Djavax.net.debug=${ZWE_configs_sslDebug:-""} \ + -Dotel.sdk.disabled=true \ -jar ${JAR_FILE} & pid=$! diff --git a/zaas-service/src/main/resources/application.yml b/zaas-service/src/main/resources/application.yml index 3ce5e7ba71..c65b7233b1 100644 --- a/zaas-service/src/main/resources/application.yml +++ b/zaas-service/src/main/resources/application.yml @@ -118,6 +118,10 @@ spring: allow-circular-references: true web-application-type: servlet +otel: + sdk: + disabled: true + springdoc: writer-with-order-by-keys: true