Class NoopSpanScope
java.lang.Object
org.opensearch.telemetry.tracing.noop.NoopSpanScope
- All Implemented Interfaces:
AutoCloseable,SpanScope
No-op implementation of SpanScope
- Opensearch.internal:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSpanAttribute(String key, boolean value) Adds boolean attribute to theSpan.voidaddSpanAttribute(String key, double value) Adds double attribute to theSpan.voidaddSpanAttribute(String key, long value) Adds long attribute to theSpan.voidaddSpanAttribute(String key, String value) Adds string attribute to theSpan.voidaddSpanEvent(String event) Adds an event to theSpan.voidclose()closes the scopevoidRecords error in the span
-
Constructor Details
-
NoopSpanScope
public NoopSpanScope()No-args constructor
-
-
Method Details
-
addSpanAttribute
Description copied from interface:SpanScopeAdds string attribute to theSpan.- Specified by:
addSpanAttributein interfaceSpanScope- Parameters:
key- attribute keyvalue- attribute value
-
addSpanAttribute
Description copied from interface:SpanScopeAdds long attribute to theSpan.- Specified by:
addSpanAttributein interfaceSpanScope- Parameters:
key- attribute keyvalue- attribute value
-
addSpanAttribute
Description copied from interface:SpanScopeAdds double attribute to theSpan.- Specified by:
addSpanAttributein interfaceSpanScope- Parameters:
key- attribute keyvalue- attribute value
-
addSpanAttribute
Description copied from interface:SpanScopeAdds boolean attribute to theSpan.- Specified by:
addSpanAttributein interfaceSpanScope- Parameters:
key- attribute keyvalue- attribute value
-
addSpanEvent
Description copied from interface:SpanScopeAdds an event to theSpan.- Specified by:
addSpanEventin interfaceSpanScope- Parameters:
event- event name
-
setError
Description copied from interface:SpanScopeRecords error in the span -
close
public void close()Description copied from interface:SpanScopecloses the scope- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSpanScope
-