Functions -
observe
addTagToSpan |
Add a key value pair as a tag to the span.
|
finishSpan |
Finish the current span.
|
getAllMetrics |
Retrieve all registered metrics including default metrics from the ballerina runtime, and user defined metrics.
|
lookupMetric |
Retrieves the specific metric that is described by the given name and tags.
|
startRootSpan |
Start a span with no parent span.
|
startSpan |
Start a span and create child relationship to current active span or user specified span.
|
Add a key value pair as a tag to the span.
Parameters
- tagKey string
-
Key of the tag
- tagValue string
-
Value of the tag
- spanId int (default -1)
-
Id of span to which the tags should be added or -1 to add tags to the current active span
-
Return Type
(error?) An error if an error occurred while attaching tag to the span
Finish the current span.
Parameters
- spanId int
-
Id of span to finish
-
Return Type
(error?) An error if an error occurred while finishing the span
Retrieve all registered metrics including default metrics from the ballerina runtime, and user defined metrics.
-
Return Type
(Metric[]) Array of all registered metrics.
Retrieves the specific metric that is described by the given name and tags.
Parameters
- name string
-
Name of the metric to lookup.
- tags map? (default ())
-
The key/value pair tags that associated with the metric that should be looked up.
Start a span with no parent span.
Parameters
- spanName string
-
Name of the span
- tags map? (default ())
-
Tags to be associated to the span
-
Return Type
(int) SpanId of the started span
Start a span and create child relationship to current active span or user specified span.
Parameters
- spanName string
-
Name of the span
- tags map? (default ())
-
Tags to be associated to the span
- parentSpanId int (default -1)
-
Id of the parent span or -1 if parent span should be taken from system trace
-
Return Type
(int | error) SpanId of the started span