Package com.azure.core.util.tracing
Class StartSpanOptions
java.lang.Object
com.azure.core.util.tracing.StartSpanOptions
Represents span options that are available before span starts and describe it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets all attributes on span that should be set before span is started.Gets span kind.setAttribute(String key, Object value) Sets attribute on span before its started.
-
Constructor Details
-
StartSpanOptions
Describes span with given name and kind- Parameters:
kind- The kind of the span to be created.
-
-
Method Details
-
setAttribute
Sets attribute on span before its started. Such attributes may affect sampling decision.- Parameters:
key- attribute key.value- attribute value. Note that underlying tracer implementations limit supported value types:Stringintdoublebooleanlong- Arrays of the above
- Returns:
- this instance for chaining.
-
getSpanKind
Gets span kind.- Returns:
- span kind.
-
getAttributes
Gets all attributes on span that should be set before span is started.- Returns:
- attributes to be set on span and used for sampling.
-