-
public interface TraceSegmentA
{@code TraceSegment}represents the local, i.e. in the scope of this{@code Tracer}, part of a a{@code Trace}. It can consist of multiple spans, and the{@code TraceSegment}instance can only be used in relation to the{@code Span}from which it was acquired. This means that the{@code * TraceSegment}should not be stored and used at a later time, or passed around to async functions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classTraceSegment.NoOp
-
Method Summary
Modifier and Type Method Description voidsetTagTop(String key, Object value)Add a tag to the top of this {@code TraceSegment}.abstract voidsetTagTop(String key, Object value, boolean sanitize)Add a tag to the top of this {@code TraceSegment}with optional key sanitization.voidsetTagCurrent(String key, Object value)Add a tag to the current span in this {@code TraceSegment}.abstract voidsetTagCurrent(String key, Object value, boolean sanitize)Add a tag to the current span in this {@code TraceSegment}.abstract voidsetDataTop(String key, Object value)Add data to the top of this {@code TraceSegment}.abstract voideffectivelyBlocked()Mark the request as effectively blocked, by setting the tag appsec. abstract voidsetDataCurrent(String key, Object value)Add data to the current span in this {@code TraceSegment}.-
-
Method Detail
-
setTagTop
void setTagTop(String key, Object value)
Add a tag to the top of this
{@code TraceSegment}.- Parameters:
key- key of the tagvalue- value of the tag
-
setTagTop
abstract void setTagTop(String key, Object value, boolean sanitize)
Add a tag to the top of this
{@code TraceSegment}with optional key sanitization.- Parameters:
key- key of the tagvalue- value of the tagsanitize- indicates is key need to be sanitized
-
setTagCurrent
void setTagCurrent(String key, Object value)
Add a tag to the current span in this
{@code TraceSegment}.- Parameters:
key- key of the tagvalue- value of the tag
-
setTagCurrent
abstract void setTagCurrent(String key, Object value, boolean sanitize)
Add a tag to the current span in this
{@code TraceSegment}. with optional key sanitization.- Parameters:
key- key of the tagvalue- value of the tagsanitize- indicates is key need to be sanitized
-
setDataTop
abstract void setDataTop(String key, Object value)
Add data to the top of this
{@code TraceSegment}. The{@code toString}representation of the{@code value}must be valid top level JSON, i.e. an{@code Object}or an{@code Array}.- Parameters:
key- key of the datavalue- value of the data
-
effectivelyBlocked
abstract void effectivelyBlocked()
Mark the request as effectively blocked, by setting the tag appsec.blocked
-
setDataCurrent
abstract void setDataCurrent(String key, Object value)
Add data to the current span in this
{@code TraceSegment}. The{@code toString}representationof the{@code value}must be valid top level JSON, i.e. an{@code Object}or an{@code Array}.- Parameters:
key- key of the datavalue- value of the data
-
-
-
-