class OpenTracing::Instrumentation::Thrift::TracedProtocolTagsBuilder
TagsBuilder for TracedProtocol
Constants
- METHOD_PART
- NAME_PATTER
- SERVICE_NAME_PART
Public Instance Methods
==(other)
click to toggle source
# File lib/opentracing/instrumentation/thrift/traced_protocol_tags_builder.rb, line 28 def ==(other) self.class == other.class end
Private Instance Methods
build_protocol_name(protocol)
click to toggle source
# File lib/opentracing/instrumentation/thrift/traced_protocol_tags_builder.rb, line 45 def build_protocol_name(protocol) protocol.class.to_s end
build_transport_name(transport)
click to toggle source
# File lib/opentracing/instrumentation/thrift/traced_protocol_tags_builder.rb, line 49 def build_transport_name(transport) inner_transport = transport.instance_variable_get(:@transport) if inner_transport inner_transport_name = build_transport_name(inner_transport) "#{transport.class}(#{inner_transport_name})" else transport.class.to_s end end
parse_message_name(name)
click to toggle source
# File lib/opentracing/instrumentation/thrift/traced_protocol_tags_builder.rb, line 38 def parse_message_name(name) name_matches = NAME_PATTER.match(name) method = name_matches[METHOD_PART] service_name = name_matches[SERVICE_NAME_PART] [service_name, method] end