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.



8
9
10
11
# File 'lib/sentry/envelope.rb', line 8

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.



6
7
8
# File 'lib/sentry/envelope.rb', line 6

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.



6
7
8
# File 'lib/sentry/envelope.rb', line 6

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.



13
14
15
# File 'lib/sentry/envelope.rb', line 13

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.



21
22
23
# File 'lib/sentry/envelope.rb', line 21

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.



17
18
19
# File 'lib/sentry/envelope.rb', line 17

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