|
9 | 9 |
|
10 | 10 | class SentryScript extends Template
|
11 | 11 | {
|
12 |
| - const CURRENT_VERSION = '8.7.0'; |
| 12 | + public const CURRENT_VERSION = '8.7.0'; |
13 | 13 |
|
14 | 14 | /**
|
15 | 15 | * SentryScript constructor.
|
16 | 16 | *
|
17 | 17 | * @param DataHelper $dataHelper
|
| 18 | + * @param Version $version |
18 | 19 | * @param Template\Context $context
|
| 20 | + * @param Json $json |
19 | 21 | * @param array $data
|
20 | 22 | */
|
21 | 23 | public function __construct(
|
@@ -92,26 +94,41 @@ public function getEnvironment()
|
92 | 94 | return $this->dataHelper->getEnvironment();
|
93 | 95 | }
|
94 | 96 |
|
| 97 | + /** |
| 98 | + * Whether to enable session replay. |
| 99 | + */ |
95 | 100 | public function useSessionReplay(): bool
|
96 | 101 | {
|
97 | 102 | return $this->dataHelper->useSessionReplay();
|
98 | 103 | }
|
99 | 104 |
|
| 105 | + /** |
| 106 | + * Get the session replay sample rate. |
| 107 | + */ |
100 | 108 | public function getReplaySessionSampleRate(): float
|
101 | 109 | {
|
102 | 110 | return $this->dataHelper->getReplaySessionSampleRate();
|
103 | 111 | }
|
104 | 112 |
|
| 113 | + /** |
| 114 | + * Get the session replay error sample rate. |
| 115 | + */ |
105 | 116 | public function getReplayErrorSampleRate(): float
|
106 | 117 | {
|
107 | 118 | return $this->dataHelper->getReplayErrorSampleRate();
|
108 | 119 | }
|
109 | 120 |
|
| 121 | + /** |
| 122 | + * Whether to block media during replay. |
| 123 | + */ |
110 | 124 | public function getReplayBlockMedia(): bool
|
111 | 125 | {
|
112 | 126 | return $this->dataHelper->getReplayBlockMedia();
|
113 | 127 | }
|
114 | 128 |
|
| 129 | + /** |
| 130 | + * Whether to show mask text. |
| 131 | + */ |
115 | 132 | public function getReplayMaskText(): bool
|
116 | 133 | {
|
117 | 134 | return $this->dataHelper->getReplayMaskText();
|
@@ -167,21 +184,35 @@ public function stripStoreCode()
|
167 | 184 | return $this->dataHelper->stripStoreCode();
|
168 | 185 | }
|
169 | 186 |
|
| 187 | + /** |
| 188 | + * Get Store code. |
| 189 | + * |
| 190 | + * @return string |
| 191 | + */ |
170 | 192 | public function getStoreCode()
|
171 | 193 | {
|
172 | 194 | return $this->_storeManager->getStore()->getCode();
|
173 | 195 | }
|
174 | 196 |
|
| 197 | + /** |
| 198 | + * Whether tracing is enabled. |
| 199 | + */ |
175 | 200 | public function isTracingEnabled(): bool
|
176 | 201 | {
|
177 | 202 | return $this->dataHelper->isTracingEnabled();
|
178 | 203 | }
|
179 | 204 |
|
| 205 | + /** |
| 206 | + * Get sample rate for tracing. |
| 207 | + */ |
180 | 208 | public function getTracingSampleRate(): float
|
181 | 209 | {
|
182 | 210 | return $this->dataHelper->getTracingSampleRate();
|
183 | 211 | }
|
184 | 212 |
|
| 213 | + /** |
| 214 | + * Get a list of js errors to ignore. |
| 215 | + */ |
185 | 216 | public function getIgnoreJsErrors(): string
|
186 | 217 | {
|
187 | 218 | return $this->json->serialize($this->dataHelper->getIgnoreJsErrors());
|
|
0 commit comments