Skip to content

Commit

Permalink
feat(tracing): use OpenTelemtry agent instead of Elastic APM (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
giovanniberti authored Jul 13, 2023
1 parent 011bf28 commit aa2d764
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WORKDIR /app/
ARG EXTRACTED=/workspace/app/target/extracted

# ELK apm agent
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
ADD --chown=user https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.25.1/opentelemetry-javaagent.jar .

COPY --from=build --chown=user ${EXTRACTED}/dependencies/ ./
RUN true
Expand All @@ -37,4 +37,4 @@ COPY --from=build --chown=user ${EXTRACTED}/application/ ./
RUN true


ENTRYPOINT ["java","-javaagent:apm-elk-agent.jar","--enable-preview","org.springframework.boot.loader.JarLauncher"]
ENTRYPOINT ["java","-javaagent:opentelemetry-javaagent.jar","--enable-preview","org.springframework.boot.loader.JarLauncher"]
10 changes: 5 additions & 5 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ microservice-chart:
PENDING_TRANSACTIONS_MAX_TRANSACTIONS_PER_PAGE: "5"
PENDING_TRANSACTIONS_PAGE_ANALYSIS_DELAY_SECONDS: "1"
PENDING_TRANSACTIONS_SEND_PAYMENT_RESULT_TIMEOUT_SECONDS: "3900"
ELASTIC_APM_SERVICE_NAME: pagopa-ecommerce-transactions-scheduler-service
ELASTIC_APM_APPLICATION_PACKAGES: it.pagopa.ecommerce.transactions.scheduler
ELASTIC_APM_SERVER_URL: http://quickstart-apm-http.elastic-system.svc:8200
ELASTIC_APM_LOG_SENDING: "false"
OTEL_RESOURCE_ATTRIBUTES: "service.name=pagopa-ecommerce-transactions-scheduler-service,service.deployment.environment=dev"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_LOGS_EXPORTER: none
OTEL_TRACES_SAMPLER: "always_on"
ECS_SERVICE_NAME: pagopa-ecommerce-transactions-scheduler-service
ECS_SERVICE_ENVIRONMENT: "dev"
envSecret:
MONGO_PASSWORD: mongo-ecommerce-password
QUEUE_TRANSIENT_CONNECTION_STRING: ecommerce-storage-transient-connection-string
ELASTIC_APM_SECRET_TOKEN: elastic-apm-secret-token
OTEL_EXPORTER_OTLP_HEADERS: elastic-otel-token-header
keyvault:
name: "pagopa-d-ecommerce-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
Expand Down
20 changes: 10 additions & 10 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ microservice-chart:
PENDING_TRANSACTIONS_PAGE_ANALYSIS_DELAY_SECONDS: "1"
PENDING_TRANSACTIONS_SEND_PAYMENT_RESULT_TIMEOUT_SECONDS: "3900"
TRANSIENT_QUEUES_TTL_SECONDS: "2592000"
ELASTIC_APM_SERVICE_NAME: pagopa-ecommerce-transactions-scheduler-service-blue
ELASTIC_APM_APPLICATION_PACKAGES: it.pagopa.ecommerce.transactions.scheduler
ELASTIC_APM_SERVER_URL: http://quickstart-apm-http.elastic-system.svc:8200
ELASTIC_APM_LOG_SENDING: "false"
OTEL_RESOURCE_ATTRIBUTES: "service.name=pagopa-ecommerce-transactions-scheduler-service-blue,service.deployment.environment=prod"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_LOGS_EXPORTER: none
OTEL_TRACES_SAMPLER: "always_on"
ECS_SERVICE_NAME: pagopa-ecommerce-transactions-scheduler-service-blue
ECS_SERVICE_ENVIRONMENT: "prod"
envSecret:
MONGO_PASSWORD: mongo-ecommerce-password
QUEUE_TRANSIENT_CONNECTION_STRING: ecommerce-storage-transient-connection-string
ELASTIC_APM_SECRET_TOKEN: elastic-apm-secret-token
OTEL_EXPORTER_OTLP_HEADERS: elastic-otel-token-header
image:
repository: pagopapcommonacr.azurecr.io/pagopaecommercetransactionsschedulerservice
tag: "0.2.8"
Expand Down Expand Up @@ -120,16 +120,16 @@ microservice-chart:
PENDING_TRANSACTIONS_PARALLEL_EVENTS_TO_PROCESS: "1"
PENDING_TRANSACTIONS_SEND_PAYMENT_RESULT_TIMEOUT_SECONDS: "3900"
TRANSIENT_QUEUES_TTL_SECONDS: "2592000"
ELASTIC_APM_SERVICE_NAME: pagopa-ecommerce-transactions-scheduler-service
ELASTIC_APM_APPLICATION_PACKAGES: it.pagopa.ecommerce.transactions.scheduler
ELASTIC_APM_SERVER_URL: http://quickstart-apm-http.elastic-system.svc:8200
ELASTIC_APM_LOG_SENDING: "false"
OTEL_RESOURCE_ATTRIBUTES: "service.name=pagopa-ecommerce-transactions-scheduler-service,service.deployment.environment=prod"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_LOGS_EXPORTER: none
OTEL_TRACES_SAMPLER: "always_on"
ECS_SERVICE_NAME: pagopa-ecommerce-transactions-scheduler-service
ECS_SERVICE_ENVIRONMENT: "prod"
envSecret:
MONGO_PASSWORD: mongo-ecommerce-password
QUEUE_TRANSIENT_CONNECTION_STRING: ecommerce-storage-transient-connection-string
ELASTIC_APM_SECRET_TOKEN: elastic-apm-secret-token
OTEL_EXPORTER_OTLP_HEADERS: elastic-otel-token-header
keyvault:
name: "pagopa-p-ecommerce-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
Expand Down
20 changes: 10 additions & 10 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ microservice-chart:
PENDING_TRANSACTIONS_MAX_TRANSACTIONS_PER_PAGE: "5"
PENDING_TRANSACTIONS_PAGE_ANALYSIS_DELAY_SECONDS: "1"
PENDING_TRANSACTIONS_SEND_PAYMENT_RESULT_TIMEOUT_SECONDS: "3900"
ELASTIC_APM_SERVICE_NAME: pagopa-ecommerce-transactions-scheduler-service-blue
ELASTIC_APM_APPLICATION_PACKAGES: it.pagopa.ecommerce.transactions.scheduler
ELASTIC_APM_SERVER_URL: http://quickstart-apm-http.elastic-system.svc:8200
ELASTIC_APM_LOG_SENDING: "false"
OTEL_RESOURCE_ATTRIBUTES: "service.name=pagopa-ecommerce-transactions-scheduler-service-blue,service.deployment.environment=uat"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_LOGS_EXPORTER: none
OTEL_TRACES_SAMPLER: "always_on"
ECS_SERVICE_NAME: pagopa-ecommerce-transactions-scheduler-service-blue
ECS_SERVICE_ENVIRONMENT: "uat"
envSecret:
MONGO_PASSWORD: mongo-ecommerce-password
QUEUE_TRANSIENT_CONNECTION_STRING: ecommerce-storage-transient-connection-string
ELASTIC_APM_SECRET_TOKEN: elastic-apm-secret-token
OTEL_EXPORTER_OTLP_HEADERS: elastic-otel-token-header
image:
repository: pagopaucommonacr.azurecr.io/pagopaecommercetransactionsschedulerservice
tag: "0.2.8"
Expand Down Expand Up @@ -118,16 +118,16 @@ microservice-chart:
PENDING_TRANSACTIONS_MAX_TRANSACTIONS_PER_PAGE: "5"
PENDING_TRANSACTIONS_PAGE_ANALYSIS_DELAY_SECONDS: "1"
PENDING_TRANSACTIONS_SEND_PAYMENT_RESULT_TIMEOUT_SECONDS: "3900"
ELASTIC_APM_SERVICE_NAME: pagopa-ecommerce-transactions-scheduler-service
ELASTIC_APM_APPLICATION_PACKAGES: it.pagopa.ecommerce.transactions.scheduler
ELASTIC_APM_SERVER_URL: http://quickstart-apm-http.elastic-system.svc:8200
ELASTIC_APM_LOG_SENDING: "false"
OTEL_RESOURCE_ATTRIBUTES: "service.name=pagopa-ecommerce-transactions-scheduler-service,service.deployment.environment=uat"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
OTEL_LOGS_EXPORTER: none
OTEL_TRACES_SAMPLER: "always_on"
ECS_SERVICE_NAME: pagopa-ecommerce-transactions-scheduler-service
ECS_SERVICE_ENVIRONMENT: "uat"
envSecret:
MONGO_PASSWORD: mongo-ecommerce-password
QUEUE_TRANSIENT_CONNECTION_STRING: ecommerce-storage-transient-connection-string
ELASTIC_APM_SECRET_TOKEN: elastic-apm-secret-token
OTEL_EXPORTER_OTLP_HEADERS: elastic-otel-token-header
keyvault:
name: "pagopa-u-ecommerce-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"
Expand Down

0 comments on commit aa2d764

Please sign in to comment.