Class NoopScopedSpan
java.lang.Object
org.opensearch.telemetry.tracing.noop.NoopScopedSpan
- All Implemented Interfaces:
AutoCloseable,ScopedSpan
No-op implementation of SpanScope
- Opensearch.internal:
-
Field Summary
Fields inherited from interface org.opensearch.telemetry.tracing.ScopedSpan
NO_OP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String key, boolean value) Adds boolean attribute to theSpan.voidaddAttribute(String key, double value) Adds double attribute to theSpan.voidaddAttribute(String key, long value) Adds long attribute to theSpan.voidaddAttribute(String key, String value) Adds string attribute to theSpan.voidAdds an event to theSpan.voidclose()closes the scopevoidRecords error in the span
-
Constructor Details
-
NoopScopedSpan
public NoopScopedSpan()No-args constructor
-
-
Method Details
-
addAttribute
Description copied from interface:ScopedSpanAdds string attribute to theSpan.- Specified by:
addAttributein interfaceScopedSpan- Parameters:
key- attribute keyvalue- attribute value
-
addAttribute
Description copied from interface:ScopedSpanAdds long attribute to theSpan.- Specified by:
addAttributein interfaceScopedSpan- Parameters:
key- attribute keyvalue- attribute value
-
addAttribute
Description copied from interface:ScopedSpanAdds double attribute to theSpan.- Specified by:
addAttributein interfaceScopedSpan- Parameters:
key- attribute keyvalue- attribute value
-
addAttribute
Description copied from interface:ScopedSpanAdds boolean attribute to theSpan.- Specified by:
addAttributein interfaceScopedSpan- Parameters:
key- attribute keyvalue- attribute value
-
addEvent
Description copied from interface:ScopedSpanAdds an event to theSpan.- Specified by:
addEventin interfaceScopedSpan- Parameters:
event- event name
-
setError
Description copied from interface:ScopedSpanRecords error in the span- Specified by:
setErrorin interfaceScopedSpan- Parameters:
exception- exception to be recorded
-
close
public void close()Description copied from interface:ScopedSpancloses the scope- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceScopedSpan
-