Method: SentryMessageFormat#initialize

Defined in:
lib/fluent/plugin/out_sentry.rb

#initialize(timestamp, event_id, component_name, environment, release, tags, request, exception, platform, transaction, otel_trace_id, user) ⇒ 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
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/fluent/plugin/out_sentry.rb', line 61

def initialize(
  timestamp,
  event_id,
  component_name,
  environment,
  release,
  tags,
  request,
  exception,
  platform,
  transaction,
  otel_trace_id,
  user
)
  @event_id = event_id
  @timestamp = timestamp
  @server_name = component_name
  @environment = environment
  @release = release
  @tags = tags
  @request = request
  @platform = platform
  @transaction = transaction

  unless otel_trace_id.include? 'ukw'
    self.contexts = create_context(otel_trace_id)
  end

  @user = if user.nil?
            {}
          else
            @user
          end

  self.exception = SentryException.new(exception)
end