Module: SpanExtension
- Included in:
- OpenTelemetry::SDK::Trace::Span
- Defined in:
- lib/epsagon.rb
Constant Summary collapse
- BLANKS =
[nil, [], '']
Instance Method Summary collapse
Instance Method Details
#initialize(*args) ⇒ Object
97 98 99 100 101 102 103 104 105 |
# File 'lib/epsagon.rb', line 97 def initialize(*args) super(*args) if @attributes @attributes = Hash[@attributes.map { |k,v| [k, Util.trim_attr(v, Epsagon.get_config[:max_attribute_size])] }] end end |
#set_attribute(key, value) ⇒ Object
90 91 92 93 94 95 |
# File 'lib/epsagon.rb', line 90 def set_attribute(key, value) unless BLANKS.include?(value) value = Util.trim_attr(value, Epsagon.get_config[:max_attribute_size]) super(key, value) end end |