diff --git a/app/Exceptions/Trackers/Bugsnag.php b/app/Exceptions/Trackers/Bugsnag.php index df340570a..1ec5a68f3 100644 --- a/app/Exceptions/Trackers/Bugsnag.php +++ b/app/Exceptions/Trackers/Bugsnag.php @@ -13,7 +13,7 @@ class Bugsnag { app('bugsnag')->setAppVersion(version('short')); - $tags = self::getTrackerTags(); + $tags = static::getTrackerTags(); app('bugsnag')->registerCallback(function ($report) use($tags) { $report->setMetaData([ diff --git a/app/Exceptions/Trackers/Sentry.php b/app/Exceptions/Trackers/Sentry.php index 98cdde0fb..e345c91c0 100644 --- a/app/Exceptions/Trackers/Sentry.php +++ b/app/Exceptions/Trackers/Sentry.php @@ -16,7 +16,7 @@ class Sentry { $event->setRelease(version('short')); - $tags = self::getTrackerTags(); + $tags = static::getTrackerTags(); $event->setTags($tags); diff --git a/app/Traits/Trackers.php b/app/Traits/Trackers.php index bbe5d85ae..41bb253df 100644 --- a/app/Traits/Trackers.php +++ b/app/Traits/Trackers.php @@ -6,7 +6,7 @@ use Illuminate\Support\Str; trait Trackers { - public function getTrackerTags(): array + public static function getTrackerTags(): array { return [ 'company_id' => (string) company_id(), diff --git a/app/View/Components/Script/Exceptions/Trackers.php b/app/View/Components/Script/Exceptions/Trackers.php index 6a11b40db..216c92c32 100644 --- a/app/View/Components/Script/Exceptions/Trackers.php +++ b/app/View/Components/Script/Exceptions/Trackers.php @@ -87,7 +87,7 @@ class Trackers extends Component return $tags; } - return $this->getTrackerTags(); + return static::getTrackerTags(); } public function getParams($params) @@ -105,7 +105,7 @@ class Trackers extends Component case 'sentry': $params = [ 'release' => version('short'), - 'traces_sample_rate' => $this->sentryTracesSampleRate(), + 'traces_sample_rate' => static::sentryTracesSampleRate(), ]; break; }