From 07846945f7eb4fca51b658f2cd2d572f9e4bcbf3 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 14 Sep 2021 13:32:57 +0200 Subject: [PATCH] TIM-55: Configure sentry for timetracker --- .gitignore | 1 + README.rst | 7 +++++-- app/AppKernel.php | 1 + app/config/config.yml | 1 + app/config/sentry.yml.dist | 7 +++++++ 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 app/config/sentry.yml.dist diff --git a/.gitignore b/.gitignore index e60c14adb..8d3c13a47 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ /app/config/parameters.yml /app/config/parameters.ini /app/config/ldap_ou_team_mapping.yml +/app/config/sentry.yml /app/logs/*.log /app/cache/* /app/build/ diff --git a/README.rst b/README.rst index 4d13bd345..81662f811 100644 --- a/README.rst +++ b/README.rst @@ -99,6 +99,9 @@ Setup - manual from from sources If you want to adjust that later, edit ``app/config/parameters.yml`` + Also copy ``app/config/sentry.yml.dist`` to ``app/config/sentry.yml``, + and fill the ``dsn`` key if necessary. + #. Make cache and log directory writable:: $ chmod -R og+w app/cache/ app/logs/ @@ -130,9 +133,9 @@ Setup - with prebuilt docker images #. Create an empty folder #. Put the provided docker-composer.yml from this git repo in it #. Put the provided nginx configuration file from this repo into the above created folder -#. Put the provided app/config/parameters.yml.dist from this repo as paramters.yml into the above created folder +#. Put the provided ``app/config/parameters.yml.dist`` from this repo as ``parameters.yml`` into the above created folder, and ``sentry.yml.dist`` as ``sentry.yml``. #. Check and adapt the copied confoguration files to your needs -#. Run docker-compose up -d +#. Run ``docker-compose up -d`` Trusted proxies diff --git a/app/AppKernel.php b/app/AppKernel.php index 7499e2b40..e5ef08cb3 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -21,6 +21,7 @@ public function registerBundles() new JMS\DiExtraBundle\JMSDiExtraBundle($this), new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(), new Netresearch\TimeTrackerBundle\NetresearchTimeTrackerBundle(), + new Sentry\SentryBundle\SentryBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { diff --git a/app/config/config.yml b/app/config/config.yml index 3c7fe5482..72635732b 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -1,6 +1,7 @@ imports: - { resource: parameters.yml } - { resource: security.yml } + - { resource: sentry.yml } framework: #esi: ~ diff --git a/app/config/sentry.yml.dist b/app/config/sentry.yml.dist new file mode 100644 index 000000000..45e0e76da --- /dev/null +++ b/app/config/sentry.yml.dist @@ -0,0 +1,7 @@ +sensio_framework_extra: + psr_message: + enabled: false +sentry: + dsn: "" + tracing: + enabled: false