Class: OpenTracing::Instrumentation::Thrift::TracedProcessorOperationNameBuilder
- Inherits:
-
Object
- Object
- OpenTracing::Instrumentation::Thrift::TracedProcessorOperationNameBuilder
- Defined in:
- lib/opentracing/instrumentation/thrift/traced_processor_operation_name_builder.rb
Overview
Thrift processor trace operation name builder
Constant Summary collapse
- DEFAULT_OPERATION_NAME_TEMPALTE =
'thrift_processor(%<name>s)'
Instance Method Summary collapse
-
#build(name, type, seq_id) ⇒ String
Operation name.
-
#initialize(operation_name_template: DEFAULT_OPERATION_NAME_TEMPALTE) ⇒ TracedProcessorOperationNameBuilder
constructor
A new instance of TracedProcessorOperationNameBuilder.
Constructor Details
#initialize(operation_name_template: DEFAULT_OPERATION_NAME_TEMPALTE) ⇒ TracedProcessorOperationNameBuilder
Returns a new instance of TracedProcessorOperationNameBuilder.
12 13 14 15 16 |
# 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 |
Instance Method Details
#build(name, type, seq_id) ⇒ String
Returns operation name.
22 23 24 25 |
# 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 |