Class: Sentry::Envelope Private

Inherits:
Object
  • Object
show all
Defined in:
lib/sentry/envelope.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.

Defined Under Namespace

Classes: Item

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(headers = {}) ⇒ Envelope

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.

Returns a new instance of Envelope.



93
94
95
96
# File 'lib/sentry/envelope.rb', line 93

def initialize(headers = {})
  @headers = headers
  @items = []
end

Instance Attribute Details

#headersObject

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.



91
92
93
# File 'lib/sentry/envelope.rb', line 91

def headers
  @headers
end

#itemsObject

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.



91
92
93
# File 'lib/sentry/envelope.rb', line 91

def items
  @items
end

Instance Method Details

#add_item(headers, payload) ⇒ 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.



98
99
100
# File 'lib/sentry/envelope.rb', line 98

def add_item(headers, payload)
  @items << Item.new(headers, payload)
end

#event_idObject

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.



106
107
108
# File 'lib/sentry/envelope.rb', line 106

def event_id
  @headers[:event_id]
end

#item_typesObject

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.



102
103
104
# File 'lib/sentry/envelope.rb', line 102

def item_types
  @items.map(&:type)
end