Package com.google.genkit.core.tracing
Class SpanMetadata
java.lang.Object
com.google.genkit.core.tracing.SpanMetadata
SpanMetadata contains metadata for a tracing span.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SpanMetadata.Creates a new SpanMetadata with the specified values. -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute(String key, Object value) Adds an attribute to the span metadata.static SpanMetadata.Builderbuilder()Creates a builder for SpanMetadata.getName()getType()voidsetAttributes(Map<String, Object> attributes) voidvoidsetSubtype(String subtype) void
-
Constructor Details
-
SpanMetadata
public SpanMetadata()Creates a new SpanMetadata. -
SpanMetadata
Creates a new SpanMetadata with the specified values.- Parameters:
name- the span nametype- the span typesubtype- the span subtypeattributes- additional attributes
-
-
Method Details
-
builder
Creates a builder for SpanMetadata.- Returns:
- a new builder
-
getName
-
setName
-
getType
-
setType
-
getSubtype
-
setSubtype
-
getAttributes
-
setAttributes
-
addAttribute
Adds an attribute to the span metadata.- Parameters:
key- the attribute keyvalue- the attribute value- Returns:
- this SpanMetadata for chaining
-