Class: Realuptime::Errors::State

Inherits:
Object
  • Object
show all
Defined in:
lib/realuptime/errors.rb

Overview

Everything init() keeps. Breadcrumbs and the v2 sticky scope are bounded at WRITE time so a long-lived process cannot grow them without limit; the eviction count rides every event as breadcrumbsDropped.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dsn:, release:, environment:, allow_fields:, transport:, device:) ⇒ State

Returns a new instance of State.



68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/realuptime/errors.rb', line 68

def initialize(dsn:, release:, environment:, allow_fields:, transport:, device:)
  @dsn = dsn
  @release = release
  @environment = environment
  @allow_fields = allow_fields
  @transport = transport
  @device = device
  @lock = Mutex.new
  @breadcrumbs = []
  @breadcrumbs_evicted = 0
  @user = nil
  @tags = {}
  @context = {}
end

Instance Attribute Details

#allow_fieldsObject (readonly)

Returns the value of attribute allow_fields.



65
66
67
# File 'lib/realuptime/errors.rb', line 65

def allow_fields
  @allow_fields
end

Returns the value of attribute breadcrumbs.



66
67
68
# File 'lib/realuptime/errors.rb', line 66

def breadcrumbs
  @breadcrumbs
end

Returns the value of attribute breadcrumbs_evicted.



66
67
68
# File 'lib/realuptime/errors.rb', line 66

def breadcrumbs_evicted
  @breadcrumbs_evicted
end

#contextObject

Returns the value of attribute context.



66
67
68
# File 'lib/realuptime/errors.rb', line 66

def context
  @context
end

#deviceObject (readonly)

Returns the value of attribute device.



65
66
67
# File 'lib/realuptime/errors.rb', line 65

def device
  @device
end

#dsnObject (readonly)

Returns the value of attribute dsn.



65
66
67
# File 'lib/realuptime/errors.rb', line 65

def dsn
  @dsn
end

#environmentObject (readonly)

Returns the value of attribute environment.



65
66
67
# File 'lib/realuptime/errors.rb', line 65

def environment
  @environment
end

#lockObject (readonly)

Returns the value of attribute lock.



65
66
67
# File 'lib/realuptime/errors.rb', line 65

def lock
  @lock
end

#releaseObject (readonly)

Returns the value of attribute release.



65
66
67
# File 'lib/realuptime/errors.rb', line 65

def release
  @release
end

#tagsObject

Returns the value of attribute tags.



66
67
68
# File 'lib/realuptime/errors.rb', line 66

def tags
  @tags
end

#transportObject (readonly)

Returns the value of attribute transport.



65
66
67
# File 'lib/realuptime/errors.rb', line 65

def transport
  @transport
end

#userObject

Returns the value of attribute user.



66
67
68
# File 'lib/realuptime/errors.rb', line 66

def user
  @user
end