aperta-principium/Interclip

View on GitHub
includes/lib/sentry.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

exec('git rev-parse --verify HEAD', $sentryOutput);
$sentryHash = $sentryOutput[0];
$sentryRelease = substr($sentryHash, 0, 7);

/* Sentry */
if (!empty($_ENV['SENTRY_URL'])) {
    \Sentry\init([
        'dsn' => $_ENV['SENTRY_URL'],
        'release' => $sentryRelease,
        'traces_sample_rate' => floatval($_ENV['TRACES_SAMPLE_RATE'])
    ]);
}