Class: Datadog::Tracing::Contrib::Propagation::SqlComment::Mode

Inherits:
Struct
  • Object
show all
Defined in:
lib/datadog/tracing/contrib/propagation/sql_comment/mode.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#modeObject

Returns the value of attribute mode

Returns:

  • (Object)

    the current value of mode



11
12
13
# File 'lib/datadog/tracing/contrib/propagation/sql_comment/mode.rb', line 11

def mode
  @mode
end

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/datadog/tracing/contrib/propagation/sql_comment/mode.rb', line 12

def enabled?
  service? || full?
end

#full?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/datadog/tracing/contrib/propagation/sql_comment/mode.rb', line 20

def full?
  mode == Ext::FULL
end

#service?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/datadog/tracing/contrib/propagation/sql_comment/mode.rb', line 16

def service?
  mode == Ext::SERVICE
end