File: scope.rb

package info (click to toggle)
ruby-opentracing 0.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 160 kB
  • sloc: ruby: 158; makefile: 4; sh: 4
file content (22 lines) | stat: -rw-r--r-- 558 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module OpenTracing
  # Scope represents an OpenTracing Scope
  #
  # See http://www.opentracing.io for more information.
  class Scope
    NOOP_INSTANCE = Scope.new.freeze

    # Return the Span scoped by this Scope
    #
    # @return [Span]
    def span
      Span::NOOP_INSTANCE
    end

    # Mark the end of the active period for the current thread and Scope,
    # updating the ScopeManager#active in the process.
    #
    # NOTE: Calling close more than once on a single Scope instance leads to
    # undefined behavior.
    def close; end
  end
end