Skip to content

Commit

Permalink
chore: Add in Elastic APM so we may have an easier time of doing debu…
Browse files Browse the repository at this point in the history
…gs in the future.

Refs: OPS-IWANNASOIDO
  • Loading branch information
cafuego committed Oct 27, 2023
1 parent 2052aaa commit ba62380
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docker/99-elastic-apm-custom.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
; This file contains the various settings for the Elastic APM PHP agent. For
; further details refers to the following URL:
; https://www.elastic.co/guide/en/apm/agent/php/current/configuration-reference.html
;

[elastic]
elastic_apm.enabled = ${PHP_ELASTIC_APM_ENABLED}
;elastic_apm.api_key = "REPLACE_WITH_API_KEY"
elastic_apm.environment = "${PHP_ELASTIC_APM_ENVIRONMENT}"
elastic_apm.log_level = "INFO"
elastic_apm.log_level_stderr = "INFO"
elastic_apm.secret_token = "${PHP_ELASTIC_APM_TOKEN}"
;elastic_apm.server_timeout = "30s"
elastic_apm.server_url = "${PHP_ELASTIC_APM_SERVER}"
elastic_apm.service_name = "${PHP_ELASTIC_APM_SERVICE}"
elastic_apm.service_version = ${GIT_SHA}
;elastic_apm.transaction_max_spans = 500
;elastic_apm.transaction_sample_rate = 1.0
;elastic_apm.verify_server_cert = true
6 changes: 6 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ COPY --from=builder /srv/www/composer.patches.json /srv/www/composer.patches.jso
COPY --from=builder /srv/www/composer.lock /srv/www/composer.lock
COPY --from=builder /srv/www/symfony.lock /srv/www/symfony.lock
COPY --from=builder /srv/www/PATCHES /srv/www/PATCHES
COPY --from=builder /srv/www/docker/99-elastic-apm-custom.ini /tmp/99-elastic-apm-custom.ini

RUN curl -L -o /tmp/apm-agent-php_all.apk https://github.com/elastic/apm-agent-php/releases/download/v1.10.0/apm-agent-php_1.10.0_all.apk && \
apk add --allow-untrusted /tmp/apm-agent-php_all.apk && \
rm -f /tmp/apm-agent-php_all.apk && \
mv -f /tmp/99-elastic-apm-custom.ini /etc/php82/conf.d/99-elastic-apm-custom.ini

0 comments on commit ba62380

Please sign in to comment.