lib/instana/tracing/span.rb in instana-1.4.2 vs lib/instana/tracing/span.rb in instana-1.4.4
- old
+ new
@@ -269,9 +269,18 @@
#
def set_tag(key, value)
if custom?
@data[:data][:sdk][:custom] ||= {}
@data[:data][:sdk][:custom][key] = value
+
+ if key.to_sym == :'span.kind'
+ case value.to_sym
+ when :server || :consumer
+ @data[:data][:sdk][:type] = :entry
+ when :client || :producer
+ @data[:data][:sdk][:type] = :exit
+ end
+ end
else
if !@data[:data].key?(key)
@data[:data][key] = value
elsif value.is_a?(Hash) && self[:data][key].is_a?(Hash)
@data[:data][key].merge!(value)