Class: OpenTracing::Instrumentation::Bunny::PublishTagsBuilder
- Inherits:
-
Object
- Object
- OpenTracing::Instrumentation::Bunny::PublishTagsBuilder
- Defined in:
- lib/opentracing/instrumentation/bunny/publish_tags_builder.rb
Overview
PublishTagsBuilder build span tags for Bunny::PublishTracer
Constant Summary collapse
- DEFAULT_STATIC_TAGS =
{ 'span.kind' => 'publiser', 'component' => 'bunny', }.freeze
- DEFAULT_CONTENT_TYPE =
::Bunny::Channel::DEFAULT_CONTENT_TYPE
- DEFAULT_PERSISTENT =
true
- DEFAAUL_PRIORITY =
0
Instance Method Summary collapse
- #build_tags(exchange, opts) ⇒ Hash<String, String>
-
#initialize(static_tags: DEFAULT_STATIC_TAGS) ⇒ PublishTagsBuilder
constructor
A new instance of PublishTagsBuilder.
Constructor Details
#initialize(static_tags: DEFAULT_STATIC_TAGS) ⇒ PublishTagsBuilder
Returns a new instance of PublishTagsBuilder.
20 21 22 |
# File 'lib/opentracing/instrumentation/bunny/publish_tags_builder.rb', line 20 def initialize(static_tags: DEFAULT_STATIC_TAGS) @static_tags = end |
Instance Method Details
#build_tags(exchange, opts) ⇒ Hash<String, String>
36 37 38 39 40 41 42 |
# File 'lib/opentracing/instrumentation/bunny/publish_tags_builder.rb', line 36 def (exchange, opts) @static_tags .merge((exchange)) .merge((opts)) .merge((opts)) .compact end |