class SentryMessageFormat

Attributes

environment[RW]
error_message[RW]
error_type[RW]
event_id[RW]
exception[RW]
platform[RW]
release[RW]
request[RW]
server_name[RW]
tags[RW]
timestamp[RW]
transaction[RW]
user[RW]

Public Class Methods

new( timestamp, event_id, component_name, environment, release, tags, request, exception, platform, transaction ) click to toggle source
# File lib/fluent/plugin/out_sentry.rb, line 61
def initialize(
  timestamp,
  event_id,
  component_name,
  environment,
  release,
  tags,
  request,
  exception,
  platform,
  transaction
)
  @event_id = event_id
  @timestamp = timestamp
  @server_name = component_name
  @environment = environment
  @release = release
  @tags = tags
  @request = request
  @platform = platform
  @transaction = transaction
  self.exception = SentryException.new(exception)
end

Public Instance Methods

to_json(*_args) click to toggle source
# 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