From b84af0cf55bb5bcae35f13c370e190f29c73b42e Mon Sep 17 00:00:00 2001 From: Simone Infante Date: Fri, 17 Mar 2023 10:38:23 +0100 Subject: [PATCH 1/8] feat: apm elk integration --- Dockerfile | 6 +++--- helm/values-dev.yaml | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index bce8c3bd..e9a9485c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,8 @@ WORKDIR /app/ ARG EXTRACTED=/workspace/app/target/extracted -ADD --chown=user https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.4.1/applicationinsights-agent-3.4.1.jar ./applicationinsights-agent.jar -COPY --chown=user applicationinsights.json ./applicationinsights.json +ADD --chown=user https://search.maven.org/remotecontent?filepath=co/elastic/apm/elastic-apm-agent/1.36.0/elastic-apm-agent-1.36.0.jar ./apm-elk-agent.jar +COPY --chown=user apm-elk-agent.json ./apm-elk-agent.json COPY --from=build --chown=user ${EXTRACTED}/dependencies/ ./ RUN true @@ -35,4 +35,4 @@ COPY --from=build --chown=user ${EXTRACTED}/application/ ./ RUN true -ENTRYPOINT ["java","-javaagent:applicationinsights-agent.jar","org.springframework.boot.loader.JarLauncher"] \ No newline at end of file +ENTRYPOINT ["java","-javaagent:apm-elk-agent.jar","org.springframework.boot.loader.JarLauncher"] \ No newline at end of file diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 8a802476..e5888c3e 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -78,7 +78,11 @@ microservice-chart: NODO_PER_PM_URI: /nodo/nodo-per-pm/v1/checkPosition NODO_READ_TIMEOUT: "10000" NODO_CONNECTION_TIMEOUT: "10000" + ELASTIC_APM_SERVICE_NAME: pagopa-ecommerce-payment-requests-service + ELASTIC_APM_APPLICATION_PACKAGES: it.pagopa.ecommerce.payment.requests + ELASTIC_APM_SERVER_URL: http://quickstart-apm-http.elastic-system.svc:8200 envSecret: + ELASTIC_APM_SECRET_TOKEN: elastic-apm-secret-token REDIS_PASSWORD: redis-ecommerce-password APPLICATIONINSIGHTS_CONNECTION_STRING: applicationinsights-connection-string NODO_CONNECTION_STRING: nodo-connection-string From 0c899128e993a6eb65308a7921b4aa60658617e1 Mon Sep 17 00:00:00 2001 From: Simone Infante Date: Fri, 17 Mar 2023 10:47:43 +0100 Subject: [PATCH 2/8] fix: delete ai config --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e9a9485c..188b1de4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,6 @@ WORKDIR /app/ ARG EXTRACTED=/workspace/app/target/extracted ADD --chown=user https://search.maven.org/remotecontent?filepath=co/elastic/apm/elastic-apm-agent/1.36.0/elastic-apm-agent-1.36.0.jar ./apm-elk-agent.jar -COPY --chown=user apm-elk-agent.json ./apm-elk-agent.json COPY --from=build --chown=user ${EXTRACTED}/dependencies/ ./ RUN true From d1861962d00d44588c9cb16098494074f66710fc Mon Sep 17 00:00:00 2001 From: Simone Infante Date: Tue, 21 Mar 2023 14:28:36 +0100 Subject: [PATCH 3/8] feat: add ai agent --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 188b1de4..e064df16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,10 @@ USER user:user WORKDIR /app/ ARG EXTRACTED=/workspace/app/target/extracted - +# AI agent +ADD --chown=user https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.4.1/applicationinsights-agent-3.4.1.jar ./applicationinsights-agent.jar +COPY --chown=user applicationinsights.json ./applicationinsights.json +# ELK apm agent ADD --chown=user https://search.maven.org/remotecontent?filepath=co/elastic/apm/elastic-apm-agent/1.36.0/elastic-apm-agent-1.36.0.jar ./apm-elk-agent.jar COPY --from=build --chown=user ${EXTRACTED}/dependencies/ ./ @@ -34,4 +37,4 @@ COPY --from=build --chown=user ${EXTRACTED}/application/ ./ RUN true -ENTRYPOINT ["java","-javaagent:apm-elk-agent.jar","org.springframework.boot.loader.JarLauncher"] \ No newline at end of file +ENTRYPOINT ["java","-javaagent:apm-elk-agent.jar","-javaagent:applicationinsights-agent.jar","org.springframework.boot.loader.JarLauncher"] \ No newline at end of file From 677454d07032fdac88b5291c9769a39cc0167bb2 Mon Sep 17 00:00:00 2001 From: Simone Infante Date: Thu, 4 May 2023 23:02:31 +0200 Subject: [PATCH 4/8] feat: add log sending elk --- helm/values-dev.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index bb22a573..c6580081 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -81,6 +81,7 @@ microservice-chart: ELASTIC_APM_SERVICE_NAME: pagopa-ecommerce-payment-requests-service ELASTIC_APM_APPLICATION_PACKAGES: it.pagopa.ecommerce.payment.requests ELASTIC_APM_SERVER_URL: http://quickstart-apm-http.elastic-system.svc:8200 + ELASTIC_APM_LOG_SENDING: "true" envSecret: ELASTIC_APM_SECRET_TOKEN: elastic-apm-secret-token REDIS_PASSWORD: redis-ecommerce-password From 18caf4971f7e487986eebcb353d0957d488c31da Mon Sep 17 00:00:00 2001 From: Simone Infante Date: Fri, 5 May 2023 08:53:23 +0200 Subject: [PATCH 5/8] feat: update apm agent --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e064df16..f990e1be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ ARG EXTRACTED=/workspace/app/target/extracted ADD --chown=user https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.4.1/applicationinsights-agent-3.4.1.jar ./applicationinsights-agent.jar COPY --chown=user applicationinsights.json ./applicationinsights.json # ELK apm agent -ADD --chown=user https://search.maven.org/remotecontent?filepath=co/elastic/apm/elastic-apm-agent/1.36.0/elastic-apm-agent-1.36.0.jar ./apm-elk-agent.jar +ADD --chown=user https://search.maven.org/remotecontent?filepath=co/elastic/apm/elastic-apm-agent/1.38.0/elastic-apm-agent-1.38.0.jar ./apm-elk-agent.jar COPY --from=build --chown=user ${EXTRACTED}/dependencies/ ./ RUN true From 36a5634e2e9b0c16f9e28c8071c060d4c836b12a Mon Sep 17 00:00:00 2001 From: Simone Infante Date: Fri, 5 May 2023 15:13:44 +0200 Subject: [PATCH 6/8] feat: add logs streams --- helm/values-dev.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index c6580081..4a13dad2 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -82,6 +82,7 @@ microservice-chart: ELASTIC_APM_APPLICATION_PACKAGES: it.pagopa.ecommerce.payment.requests ELASTIC_APM_SERVER_URL: http://quickstart-apm-http.elastic-system.svc:8200 ELASTIC_APM_LOG_SENDING: "true" + ELASTIC_APM_DATA_STREAMS: "true" envSecret: ELASTIC_APM_SECRET_TOKEN: elastic-apm-secret-token REDIS_PASSWORD: redis-ecommerce-password From 507076755fcee33726c61cf72e25f93644db35f1 Mon Sep 17 00:00:00 2001 From: Simone Infante Date: Fri, 5 May 2023 15:32:32 +0200 Subject: [PATCH 7/8] fix: logs streams --- helm/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 4a13dad2..6f81934d 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -82,7 +82,7 @@ microservice-chart: ELASTIC_APM_APPLICATION_PACKAGES: it.pagopa.ecommerce.payment.requests ELASTIC_APM_SERVER_URL: http://quickstart-apm-http.elastic-system.svc:8200 ELASTIC_APM_LOG_SENDING: "true" - ELASTIC_APM_DATA_STREAMS: "true" + ELASTIC_APM_DATA_STREAMS_ENABLED: "true" envSecret: ELASTIC_APM_SECRET_TOKEN: elastic-apm-secret-token REDIS_PASSWORD: redis-ecommerce-password From b788dd4bd8f6a0e28cd038ed3a5ea5050f333739 Mon Sep 17 00:00:00 2001 From: Simone Infante Date: Fri, 5 May 2023 19:38:22 +0200 Subject: [PATCH 8/8] fix: logs streams --- helm/values-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 6f81934d..553ff69a 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -82,7 +82,7 @@ microservice-chart: ELASTIC_APM_APPLICATION_PACKAGES: it.pagopa.ecommerce.payment.requests ELASTIC_APM_SERVER_URL: http://quickstart-apm-http.elastic-system.svc:8200 ELASTIC_APM_LOG_SENDING: "true" - ELASTIC_APM_DATA_STREAMS_ENABLED: "true" + #ELASTIC_APM_DATA_STREAMS_ENABLED: "false" envSecret: ELASTIC_APM_SECRET_TOKEN: elastic-apm-secret-token REDIS_PASSWORD: redis-ecommerce-password