Просмотр исходного кода

capture id's as tags, and pass attributes to sentry

Brian Gough 10 лет назад
Родитель
Сommit
06662f869f
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      libraries/logger/logging-manager.coffee

+ 4 - 1
libraries/logger/logging-manager.coffee

@@ -20,7 +20,10 @@ module.exports = Logger =
 		if @raven?
 			error = attributes.err or attributes.error
 			if error?
-				@raven.captureError(error, attributes)
+				tags = {}
+				for key, value of attributes
+					tags[key] = value if key.match(/_id/) and typeof value == 'string'
+				@raven.captureError(error, tags: tags, extra: attributes)
 	err: ()->
 		@logger.error.apply(@logger, arguments)
 	warn: ()->