Class: OpenTracing::Instrumentation::Thrift::TracedProtocolTagsBuilder
- Inherits:
-
Object
- Object
- OpenTracing::Instrumentation::Thrift::TracedProtocolTagsBuilder
show all
- Defined in:
- lib/opentracing/instrumentation/thrift/traced_protocol_tags_builder.rb
Overview
TagsBuilder for TracedProtocol
Instance Method Summary
collapse
Instance Method Details
#==(other) ⇒ Object
28
29
30
|
# File 'lib/opentracing/instrumentation/thrift/traced_protocol_tags_builder.rb', line 28
def ==(other)
self.class == other.class
end
|
10
11
12
13
14
15
16
17
18
|
# File 'lib/opentracing/instrumentation/thrift/traced_protocol_tags_builder.rb', line 10
def build_message_tags(name, type)
service_name, method = parse_message_name(name)
{
'thrift.method' => method,
'thrift.service_name' => service_name,
'thrift.multiplexed' => !service_name.nil?,
'thrift.type' => MESSAGE_TYPES[type],
}.merge(error_tags(type))
end
|
20
21
22
23
24
25
26
|
# File 'lib/opentracing/instrumentation/thrift/traced_protocol_tags_builder.rb', line 20
def build_protocol_tags(protocol)
transport = protocol.trans
{
'thrift.protocol' => build_protocol_name(protocol),
'thrift.transport' => build_transport_name(transport),
}
end
|