Class: StackifyRubyAPM::Serializers::Errors Private
- Inherits:
-
Serializer
- Object
- Serializer
- StackifyRubyAPM::Serializers::Errors
- Defined in:
- lib/stackify_apm/serializers/errors.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #build(error) ⇒ Object private
- #build_all(errors) ⇒ Object private
Methods inherited from Serializer
Constructor Details
This class inherits a constructor from StackifyRubyAPM::Serializers::Serializer
Instance Method Details
#build(error) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/stackify_apm/serializers/errors.rb', line 9 def build(error) if (exception = error.exception) = error. base = { CaughtBy: exception.module != '' ? exception.module : exception.type, Exception: exception.type, Message: exception., Timestamp: .round.to_s, Frames: exception.stacktrace.to_a } end base end |
#build_all(errors) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 |
# File 'lib/stackify_apm/serializers/errors.rb', line 24 def build_all(errors) { exceptions: Array(errors).map(&method(:build)) } end |