Sha256: 78bc48c246d6acf2c2ef00831d20e7b148a7bd2f021c91d8fc3e59c0781948e0
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 KB
Contents
# frozen_string_literal: true # Copyright 2019 OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 require 'singleton' module OpenTelemetry module SDK module Trace # NoopSpanProcessor is a singleton implementation of the duck type # SpanProcessor that provides synchronous no-op hooks for when a # {Span} is started or when a {Span} is ended. class NoopSpanProcessor include Singleton # Called when a {Span} is started, if the {Span#recording?} # returns true. # # This method is called synchronously on the execution thread, should # not throw or block the execution thread. # # @param [Span] span the {Span} that just started. def on_start(span); end # Called when a {Span} is ended, if the {Span#recording?} # returns true. # # This method is called synchronously on the execution thread, should # not throw or block the execution thread. # # @param [Span] span the {Span} that just ended. def on_finish(span); end # Called when {TracerFactory#shutdown} is called. def shutdown; end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
opentelemetry-sdk-0.2.0 | lib/opentelemetry/sdk/trace/noop_span_processor.rb |