Official Content

Attributes are keys and values that are applied as metadata to your spans and are useful for aggregating, filtering, and grouping traces.

The following example uses the CreateSpan method of the Tracer Object to create a Span.
Then, different attributes are set to the span using the methods for that purpose.

 

&span = Tracer.CreateSpan("TestSetAtts procedure")

&span.SetBooleanAttribute("MyBooleanAtt",true)
&span.SetDoubleAttribute("MyDoubleAtt",1256.69)
&span.SetLongAttribute("MyLongAtt",8965)
&span.SetStringAttribute("MyStringAtt","This is the Value of Attribute")

&span.End()

The following is a view of Grafana showing the created span and its attributes.

image_202431917231_1_png

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