-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkernelsentry.xml
91 lines (88 loc) · 3.61 KB
/
kernelsentry.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.4" type="plugin" group="system" method="upgrade">
<name>System - Kernel Sentry</name>
<author>Kernel Data Ltd</author>
<creationDate>April 2020</creationDate>
<copyright>Copyright (C) 2020 Kernel Data Ltd. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.kernel.co.uk</authorUrl>
<version>1.0.9</version>
<description>
Plugin to include the Sentry PHP library in Joomla
<![CDATA[
<p>Example Content of PHP Settings File: (note that variable names MUST match exactly)</p>
<pre>
<?php
class customConfig {
public $sentry_dsn = 'https://[email protected]/987654'; // Change to your Sentry DSN
public $sentry_environment = 'production'; // Change your environment label
}
</pre>
<p>To prepend Sentry execution to .htaccess file (bypassing this plugin):</p>
<ol>
<li>Create settings file as detailed above</li>
<li>
Create a PHP file to call Sentry:
<pre>
<?php
require_once dirname(__DIR__) . '/foldername/settings-file.php'; // Change to location of settings file
require_once dirname(__DIR__) . '/plugins/system/kernelsentry/vendor/autoload.php';
$settings_class = new customConfig(); // Change class name to match the class name in your settings file
Sentry\init(
[
'dsn' => $settings_class->sentry_dsn,
'environment' => $settings_class->sentry_environment
]
);
</pre>
</li>
<li>
Prepend this file to your .htaccess file. Example below, update directory to match your file location:
<pre>
php_value auto_prepend_file /home/user/public_html/foldername/sentry.php
</pre>
</li>
</ol>
]]>
</description>
<files>
<folder>vendor</folder>
<filename plugin="kernelsentry">kernelsentry.php</filename>
</files>
<config>
<fields name="params">
<fieldset name="basic">
<field
name="sentry_dsn"
type="text"
label="Sentry DSN"
description="You can find the DSN value for your project within your Sentry account."
size="60"
/>
<field
name="sentry_environment"
type="text"
label="Environment"
description="A name for the environment running, e.g. stage or production"
default="production"
/>
<field
name="settings_file"
type="text"
label="Settings File Location"
description="Do not include root directory or leading forward slash (e.g. foldername/settings-file.php) If populated, the plugin will ignore the above settings and will use those present in your environment settings file."
/>
<field
name="settings_class"
type="text"
label="Settings Class Name"
description="Do not include parenthesis. If populated, the plugin will ignore the above settings and will read them from this class instead."
/>
</fieldset>
</fields>
</config>
<updateservers>
<server type="extension" name="Kernel Sentry Update Server">https://raw.github.com/kernel-data/kernel-sentry-for-joomla/master/manifest.xml</server>
</updateservers>
</extension>