class OpenTracing::Instrumentation::Thrift::TracedProcessorOperationNameBuilder
Thrift
processor trace operation name builder
Constants
- DEFAULT_OPERATION_NAME_TEMPALTE
Attributes
operation_name_template[R]
Public Class Methods
new( operation_name_template: DEFAULT_OPERATION_NAME_TEMPALTE )
click to toggle source
@param operation_name_tempalte [String]
# File lib/opentracing/instrumentation/thrift/traced_processor_operation_name_builder.rb, line 12 def initialize( operation_name_template: DEFAULT_OPERATION_NAME_TEMPALTE ) @operation_name_template = operation_name_template end
Public Instance Methods
build(name, type, seq_id)
click to toggle source
@param name [String] method name @param type [Integer] type of message @param seq_id [Integer] numberr of message @return [String] operation name
# File lib/opentracing/instrumentation/thrift/traced_processor_operation_name_builder.rb, line 22 def build(name, type, seq_id) format_args = build_format_args(name, type, seq_id) format(operation_name_template, **format_args) end
Private Instance Methods
build_format_args(name, type, seq_id)
click to toggle source
# File lib/opentracing/instrumentation/thrift/traced_processor_operation_name_builder.rb, line 31 def build_format_args(name, type, seq_id) { name: name, type: MESSAGE_TYPES[type], seq_id: seq_id, } end