Class NoopSpan
java.lang.Object
org.opensearch.telemetry.tracing.noop.NoopSpan
- All Implemented Interfaces:
Span
No-op implementation of
Span- Opensearch.internal:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String key, Boolean value) Adds boolean type attribute in the spanvoidaddAttribute(String key, Double value) Adds double type attribute in the spanvoidaddAttribute(String key, Long value) Adds long type attribute in the spanvoidaddAttribute(String key, String value) Adds string type attribute in the spanvoidAdds an event in the spanvoidendSpan()Ends the spanReturns span's parent spanReturns spanId of the spanReturns the name of theSpanReturns traceId of the spanvoidRecords error in the span
-
Field Details
-
INSTANCE
No-op Span instance
-
-
Method Details
-
endSpan
public void endSpan()Description copied from interface:SpanEnds the span -
getParentSpan
Description copied from interface:SpanReturns span's parent span- Specified by:
getParentSpanin interfaceSpan
-
getSpanName
Description copied from interface:SpanReturns the name of theSpan- Specified by:
getSpanNamein interfaceSpan
-
addAttribute
Description copied from interface:SpanAdds string type attribute in the span- Specified by:
addAttributein interfaceSpan- Parameters:
key- of the attributevalue- value of the attribute
-
addAttribute
Description copied from interface:SpanAdds long type attribute in the span- Specified by:
addAttributein interfaceSpan- Parameters:
key- of the attributevalue- value of the attribute
-
addAttribute
Description copied from interface:SpanAdds double type attribute in the span- Specified by:
addAttributein interfaceSpan- Parameters:
key- of the attributevalue- value of the attribute
-
addAttribute
Description copied from interface:SpanAdds boolean type attribute in the span- Specified by:
addAttributein interfaceSpan- Parameters:
key- of the attributevalue- value of the attribute
-
setError
Description copied from interface:SpanRecords error in the span -
addEvent
Description copied from interface:SpanAdds an event in the span -
getTraceId
Description copied from interface:SpanReturns traceId of the span- Specified by:
getTraceIdin interfaceSpan- Returns:
- span's traceId
-
getSpanId
Description copied from interface:SpanReturns spanId of the span
-