Package io.vertigo.core.analytics.trace
Class TraceSpanBuilder
java.lang.Object
io.vertigo.core.analytics.trace.TraceSpanBuilder
This builder allows to build a span in a fluent way.
- Version:
- $Id: KProcessBuilder.java,v 1.18 2012/11/08 17:06:27 pchretien Exp $
- Author:
- pchretien, npiedeloup
-
Method Summary
Modifier and TypeMethodDescriptionaddChildSpan(TraceSpan childSpan) Adds a child span.build()Builds and returns the final object.incMeasure(String name, double value) Increments a measure.Marks this tracer as Failed.Marks this tracer as succeeded.withMeasure(String name, double value) Initializes a measure defined by a name and a value.withMetadata(String name, String value) Adds a metadata defined by a name and a value.Adds a tag defined by a name and a value.
-
Method Details
-
incMeasure
Increments a measure. if the measure is new, it's automatically created with the value.- Parameters:
name- the measure namevalue- the measure value to increment- Returns:
- this builder
-
withMeasure
Initializes a measure defined by a name and a value.- Parameters:
name- the measure namevalue- the value measure- Returns:
- this builder
-
withMetadata
Adds a metadata defined by a name and a value.- Parameters:
name- the metadata namevalue- the metadata value- Returns:
- this builder
-
withTag
Adds a tag defined by a name and a value.- Parameters:
name- the tag namevalue- the tag value- Returns:
- this builder
-
markAsSucceeded
Marks this tracer as succeeded.- Returns:
- this tracer
-
markAsFailed
Marks this tracer as Failed.- Returns:
- this tracer
-
addChildSpan
Adds a child span.- Parameters:
childSpan- the child span to add- Returns:
- this builder
-
build
Builds and returns the final object.
-