Package io.opentelemetry.sdk.trace
Class NoopSpanProcessor
- java.lang.Object
-
- io.opentelemetry.sdk.trace.NoopSpanProcessor
-
- All Implemented Interfaces:
SpanProcessor
,java.io.Closeable
,java.lang.AutoCloseable
final class NoopSpanProcessor extends java.lang.Object implements SpanProcessor
-
-
Field Summary
Fields Modifier and Type Field Description private static NoopSpanProcessor
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description private
NoopSpanProcessor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static SpanProcessor
getInstance()
boolean
isEndRequired()
Returnstrue
if thisSpanProcessor
requires end events.boolean
isStartRequired()
Returnstrue
if thisSpanProcessor
requires start events.void
onEnd(ReadableSpan span)
Called when aSpan
is ended, if theSpan.isRecording()
returns true.void
onStart(Context parentContext, ReadWriteSpan span)
Called when aSpan
is started, if theSpan.isRecording()
returns true.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.opentelemetry.sdk.trace.SpanProcessor
close, forceFlush, shutdown
-
-
-
-
Field Detail
-
INSTANCE
private static final NoopSpanProcessor INSTANCE
-
-
Method Detail
-
getInstance
static SpanProcessor getInstance()
-
onStart
public void onStart(Context parentContext, ReadWriteSpan span)
Description copied from interface:SpanProcessor
Called when aSpan
is started, if theSpan.isRecording()
returns true.This method is called synchronously on the execution thread, should not throw or block the execution thread.
- Specified by:
onStart
in interfaceSpanProcessor
- Parameters:
parentContext
- the parentContext
of the span that just started.span
- theSpan
that just started.
-
isStartRequired
public boolean isStartRequired()
Description copied from interface:SpanProcessor
Returnstrue
if thisSpanProcessor
requires start events.- Specified by:
isStartRequired
in interfaceSpanProcessor
- Returns:
true
if thisSpanProcessor
requires start events.
-
onEnd
public void onEnd(ReadableSpan span)
Description copied from interface:SpanProcessor
Called when aSpan
is ended, if theSpan.isRecording()
returns true.This method is called synchronously on the execution thread, should not throw or block the execution thread.
- Specified by:
onEnd
in interfaceSpanProcessor
- Parameters:
span
- theSpan
that just ended.
-
isEndRequired
public boolean isEndRequired()
Description copied from interface:SpanProcessor
Returnstrue
if thisSpanProcessor
requires end events.- Specified by:
isEndRequired
in interfaceSpanProcessor
- Returns:
true
if thisSpanProcessor
requires end events.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-