Module: Tracing::Matchers
- Defined in:
- lib/tracing/matchers.rb,
lib/tracing/matchers/version.rb,
lib/tracing/matchers/have_span.rb,
lib/tracing/matchers/have_spans.rb,
lib/tracing/matchers/have_traces.rb,
lib/tracing/matchers/span/have_log.rb,
lib/tracing/matchers/span/have_tag.rb,
lib/tracing/matchers/span_matchers.rb,
lib/tracing/matchers/span/be_child_of.rb,
lib/tracing/matchers/span/follow_after.rb,
lib/tracing/matchers/span/have_baggage.rb
Defined Under Namespace
Modules: Span Classes: HaveSpan, HaveSpans, HaveTraces
Constant Summary collapse
- VERSION =
"1.3.0"
Instance Method Summary collapse
-
#be_child_of(parent = :any) ⇒ HaveBaggage
(also: #have_parent)
The be_child_of matcher tests that the span/span context is a child of some other span/span context.
-
#follow_after(previous) ⇒ FollowAfter
The follow_after matcher tests that the span follows after some other span.
-
#have_baggage(*args) ⇒ HaveBaggage
(also: #have_baggage_item)
The have_baggage matcher tests that the span/span context includes baggage.
-
#have_log(**fields) ⇒ HaveTag
(also: #have_logs)
The have_log matcher tests that the span includes a tag.
-
#have_span(operation_name = anything) ⇒ HaveSpan
The have_span matcher tests that the tracer traced a span matching a criteria.
-
#have_spans(n = anything) ⇒ HaveSpans
The have_spans matcher tests that the tracer traced any or a specific number of spans.
-
#have_tag(*args) ⇒ HaveTag
(also: #have_tags)
The have_tag matcher tests that the span includes tags.
-
#have_traces(n = anything) ⇒ HaveTraces
The have_traces matcher tests that the tracer traced any or a specific number of traces.
Instance Method Details
#be_child_of(parent = :any) ⇒ HaveBaggage Also known as: have_parent
The be_child_of matcher tests that the span/span context is a child of some other span/span context.
72 73 74 |
# File 'lib/tracing/matchers/span_matchers.rb', line 72 def be_child_of(parent = :any) Tracing::Matchers::Span::BeChildOf.new(parent) end |
#follow_after(previous) ⇒ FollowAfter
The follow_after matcher tests that the span follows after some other span.
86 87 88 |
# File 'lib/tracing/matchers/span_matchers.rb', line 86 def follow_after(previous) Tracing::Matchers::Span::FollowAfter.new(previous) end |
#have_baggage(*args) ⇒ HaveBaggage Also known as: have_baggage_item
The have_baggage matcher tests that the span/span context includes baggage.
54 55 56 |
# File 'lib/tracing/matchers/span_matchers.rb', line 54 def have_baggage(*args) Tracing::Matchers::Span::HaveBaggage.new(*args) end |
#have_log(**fields) ⇒ HaveTag Also known as: have_logs
The have_log matcher tests that the span includes a tag.
37 38 39 |
# File 'lib/tracing/matchers/span_matchers.rb', line 37 def have_log(**fields) Tracing::Matchers::Span::HaveLog.new(**fields) end |
#have_span(operation_name = anything) ⇒ HaveSpan
The have_span matcher tests that the tracer traced a span matching a criteria.
147 148 149 |
# File 'lib/tracing/matchers.rb', line 147 def have_span(operation_name = anything) Tracing::Matchers::HaveSpan.new(operation_name) end |
#have_spans(n = anything) ⇒ HaveSpans
It’s possible to chain ‘started` and `finished` at the same time. Expect that only the last method will be applied e.g. `have_spans.finished.started` will result in application of `started`.
The have_spans matcher tests that the tracer traced any or a specific number of spans.
65 66 67 |
# File 'lib/tracing/matchers.rb', line 65 def have_spans(n = anything) Tracing::Matchers::HaveSpans.new(n) end |
#have_tag(*args) ⇒ HaveTag Also known as:
The have_tag matcher tests that the span includes tags.
21 22 23 |
# File 'lib/tracing/matchers/span_matchers.rb', line 21 def have_tag(*args) Tracing::Matchers::Span::HaveTag.new(*args) end |
#have_traces(n = anything) ⇒ HaveTraces
It’s possible to chain ‘started` and `finished` at the same time. Expect that only the last method will be applied e.g. `have_spans.finished.started` will result in application of `started`.
The have_traces matcher tests that the tracer traced any or a specific number of traces.
35 36 37 |
# File 'lib/tracing/matchers.rb', line 35 def have_traces(n = anything) Tracing::Matchers::HaveTraces.new(n) end |