mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 13:49:00 +02:00
sample only 1% of pdf exceptions due to volume of requests to sentry
This commit is contained in:
@@ -145,7 +145,7 @@ define [
|
||||
|
||||
timedOut = false
|
||||
timer = $timeout () =>
|
||||
Raven?.captureMessage?('pdfng page load timed out after ' + @PAGE_LOAD_TIMEOUT + 'ms')
|
||||
Raven?.captureMessage?('pdfng page load timed out after ' + @PAGE_LOAD_TIMEOUT + 'ms (1% sample)') if Math.random() < 0.01
|
||||
# console.log 'page load timed out', pagenum
|
||||
timedOut = true
|
||||
clearTimeout(spinTimer)
|
||||
@@ -246,7 +246,7 @@ define [
|
||||
timedOut = false
|
||||
|
||||
timer = $timeout () =>
|
||||
Raven?.captureMessage?('pdfng page render timed out after ' + @PAGE_RENDER_TIMEOUT + 'ms')
|
||||
Raven?.captureMessage?('pdfng page render timed out after ' + @PAGE_RENDER_TIMEOUT + 'ms (1% sample)') if Math.random() < 0.01
|
||||
# console.log 'page render timed out', pagenum
|
||||
timedOut = true
|
||||
result.cancel()
|
||||
|
||||
@@ -38,7 +38,7 @@ define [
|
||||
loadedCallback: () ->
|
||||
$scope.$emit 'loaded'
|
||||
errorCallback: (error) ->
|
||||
Raven?.captureMessage?('pdfng error ' + error)
|
||||
Raven?.captureMessage?('pdfng error ' + error + ' (1% sample)') if Math.random() < 0.01
|
||||
$scope.$emit 'pdf:error', error
|
||||
pageSizeChangeCallback: (pageNum, deltaH) ->
|
||||
$scope.$broadcast 'pdf:page:size-change', pageNum, deltaH
|
||||
|
||||
Reference in New Issue
Block a user