Class: Datadog::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDatadog::Configuration



16
17
18
19
20
21
22
# File 'lib/datadog/configuration.rb', line 16

def initialize
  @current_user   = nil
  @custom_context = -> { {} }
  @controller_key = "sinatra.controller_name"
  @resource_key   = "sinatra.resource_name"
  @action_key     = "sinatra.action_name"
end

Instance Attribute Details

#action_keyObject

Returns the value of attribute action_key.



5
6
7
# File 'lib/datadog/configuration.rb', line 5

def action_key
  @action_key
end

#controller_keyObject

Returns the value of attribute controller_key.



5
6
7
# File 'lib/datadog/configuration.rb', line 5

def controller_key
  @controller_key
end

#current_userObject

Returns the value of attribute current_user.



5
6
7
# File 'lib/datadog/configuration.rb', line 5

def current_user
  @current_user
end

#custom_contextObject

Returns the value of attribute custom_context.



5
6
7
# File 'lib/datadog/configuration.rb', line 5

def custom_context
  @custom_context
end

#resource_keyObject

Returns the value of attribute resource_key.



5
6
7
# File 'lib/datadog/configuration.rb', line 5

def resource_key
  @resource_key
end

Instance Method Details

#log_current_user?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/datadog/configuration.rb', line 24

def log_current_user?
  @current_user ? true : false
end