Class: SentryMessageFormat
- Inherits:
-
Object
- Object
- SentryMessageFormat
- Defined in:
- lib/fluent/plugin/out_sentry.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#error_type ⇒ Object
Returns the value of attribute error_type.
-
#event_id ⇒ Object
Returns the value of attribute event_id.
-
#exception ⇒ Object
Returns the value of attribute exception.
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#release ⇒ Object
Returns the value of attribute release.
-
#request ⇒ Object
Returns the value of attribute request.
-
#server_name ⇒ Object
Returns the value of attribute server_name.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#transaction ⇒ Object
Returns the value of attribute transaction.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(timestamp, event_id, component_name, environment, release, tags, request, exception, platform, transaction) ⇒ SentryMessageFormat
constructor
A new instance of SentryMessageFormat.
- #to_json(*_args) ⇒ Object
Constructor Details
#initialize(timestamp, event_id, component_name, environment, release, tags, request, exception, platform, transaction) ⇒ SentryMessageFormat
Returns a new instance of SentryMessageFormat.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/fluent/plugin/out_sentry.rb', line 61 def initialize( , event_id, component_name, environment, release, , request, exception, platform, transaction ) @event_id = event_id @timestamp = @server_name = component_name @environment = environment @release = release @tags = @request = request @platform = platform @transaction = transaction self.exception = SentryException.new(exception) end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def environment @environment end |
#error_message ⇒ Object
Returns the value of attribute error_message.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def @error_message end |
#error_type ⇒ Object
Returns the value of attribute error_type.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def error_type @error_type end |
#event_id ⇒ Object
Returns the value of attribute event_id.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def event_id @event_id end |
#exception ⇒ Object
Returns the value of attribute exception.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def exception @exception end |
#platform ⇒ Object
Returns the value of attribute platform.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def platform @platform end |
#release ⇒ Object
Returns the value of attribute release.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def release @release end |
#request ⇒ Object
Returns the value of attribute request.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def request @request end |
#server_name ⇒ Object
Returns the value of attribute server_name.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def server_name @server_name end |
#tags ⇒ Object
Returns the value of attribute tags.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def @tags end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def @timestamp end |
#transaction ⇒ Object
Returns the value of attribute transaction.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def transaction @transaction end |
#user ⇒ Object
Returns the value of attribute user.
57 58 59 |
# File 'lib/fluent/plugin/out_sentry.rb', line 57 def user @user end |
Instance Method Details
#to_json(*_args) ⇒ Object
85 86 87 88 89 90 91 92 |
# File 'lib/fluent/plugin/out_sentry.rb', line 85 def to_json(*_args) hash = {} instance_variables.each do |var| hash[var.to_s.delete '@'] = instance_variable_get var end hash.to_json end |