The OpenTelemetryListener provides a convient way to publish test metrics to a OpenTelemetry (OT) collector from RobotFramework (RF).
- one span for the Listener itselt (named "RobotListener" by default)
- one span per test suite
- one span per test
- one meter ("Test Statistics")
- one counter per test status
Test suite(s) and test hierachy is preserved.
Values are provided by robotframework (e.g. times are not adjusted or tempered with).
source
start_time
(isoformat)end_time
(isoformat) exists once suite/test is finishedtype
("SUITE"/"TEST")status
, exists if suite/test neither passed nor failed. Set to the RF status.
tags
Set to OK or ERROR for passed or failed suite/test respectively. If suite/test failed then the RF result message is used as OT status description.
Name | Description | Default | Type | Notes |
---|---|---|---|---|
url | base URL for the span exporter endpoint. | None | String | "/v1/traces" is appended automatically |
listener_span_name | name for the span of the listener | RobotListener | String | if OTEL_LISTENER_SPAN_NAME is set this argument is ignored |
module_name | module name for the tracer | __name__ | String |
Name | Description | Default | Type | Notes |
---|---|---|---|---|
OTEL_LISTENER_PROCESSOR | Batch- or Simple span processor | "simple" | Enum | "simple" or "batch" |
OTEL_LISTENER_SPAN_NAME | name of listener span name | "RobotListener" | String | can also be changed as listener_span_name arg, envion var has priority if set |
OTEL_LISTENER_STATUS_COUNTER_NAME | name of metric for test status | "Test Statistics" | String |
For further configurations check the OTel Documentation.