Official Content

Manages Observability spans.

SpanEO_pngYou can find the Span External Object in the KB Explorer within the GeneXusObservability module, which in turn is located within the GeneXus module.

Properties

SpanId

Gets the Span ID.

TraceId

Gets the Trace ID.

SpanContext

Returns the SpanContext associated with this Span.

IsRecording

A Span is recording when the data provided to it via functions like SetAttributes and SetStatus is captured in some way. This flag SHOULD be used to avoid expensive computations of Span attributes or events when a Span is not recorded.

Context

A TraceContext is a propagation mechanism that carries execution-scoped values across API boundaries and between logically associated execution units.

Methods

End

Marks the end of Span execution. It's important to end the span execution to avoid unpredictable behavior or memory leaks.

Return value None
Parameters None

RecordException

Adds an event containing the information from the specified exception.

Return value None
Parameters message:VarChar

SetStringAttribute

Adds or updates the span attribute with the given key and value.

Return value None
Parameters property:VarChar, value:VarChar

SetLongAttribute

Adds or updates the span attribute with the given key and value.

Return value None
Parameters property:VarChar, value:Numeric

SetDoubleAttribute

Adds or updates the span attribute with the given key and value.

Return value None
Parameters property:VarChar, value:Numeric

SetBooleanAttribute

Adds or updates the span attribute with the given key and value.

Return value None
Parameters name:VarChar, value:Boolean

AddBaggage

Sets the Baggage with a new key/value pair.

Return value GeneXusObservability.TraceContext
Parameters property:VarChar, value:VarChar

Returns TraceContext associated with that Baggage.

GetBaggageItem

Returns the value of a key-value pair added to the span with AddBaggage.

Return value VarChar
Parameters property:VarChar, context:GeneXusObservability.TraceContext

SetStatus

Sets the status code and description on the span.

Return value None
Parameters statusCode:SpanStatusCode, message:VarChar

SetStatus

Sets the status code on the span.

Return value None
Parameters statusCode:SpanStatusCode

Samples

Scope

Generators: .NET, Java

Availability

Since GeneXus 18 Upgrade 9.

 

Last update: November 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant