Method: Sentry::Span#with_child_span
- Defined in:
- lib/sentry/span.rb
permalink #with_child_span(**attributes, &block) {|child_span| ... } ⇒ Object
Starts a child span, yield it to the given block, and then finish the span after the block is executed.
234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/sentry/span.rb', line 234 def with_child_span(**attributes, &block) child_span = start_child(**attributes) yield(child_span) child_span.finish rescue child_span.set_http_status(500) child_span.finish raise end |