PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.21
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.21
1.10.25 1.10.24 1.10.23 1.10.22 1.10.21 1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 All 169 releases
← All changes | vendor_prefixed/sentry/sentry/src/Metrics/MetricsAggregator.php +8 -3 1.10.9 → 1.10.21 View file →
@@ -80,11 +80,16 @@
80 80 $metricTypeClass = self::METRIC_TYPES[$type];
81 81 /** @var Metric $metric */
82 82 $metric = new $metricTypeClass($name, $value, $traceId, $spanId, $attributes, \microtime(\true), $unit);
83 83 if ($client !== null) {
84 - $beforeSendMetric = $client->getOptions()->getBeforeSendMetricCallback();
85 - $metric = $beforeSendMetric($metric);
86 - if ($metric === null) {
84 + try {
85 + $beforeSendMetric = $client->getOptions()->getBeforeSendMetricCallback();
86 + $metric = $beforeSendMetric($metric);
87 + if ($metric === null) {
88 + return;
89 + }
90 + } catch (\Throwable $exception) {
91 + $client->getOptions()->getLoggerOrNullLogger()->error(\sprintf('The "before_send_metric" callback failed with exception: "%s".', $exception->getMessage()));
87 92 return;
88 93 }
89 94 }
90 95 $metrics = $this->getStorage($metricFlushThreshold);