robotframework-tracer 0.2.2__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/PKG-INFO +7 -4
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/README.md +6 -3
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/pyproject.toml +1 -1
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer/listener.py +33 -20
- robotframework_tracer-0.2.4/src/robotframework_tracer/version.py +1 -0
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer.egg-info/PKG-INFO +7 -4
- robotframework_tracer-0.2.2/src/robotframework_tracer/version.py +0 -1
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/setup.cfg +0 -0
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/setup.py +0 -0
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer/__init__.py +0 -0
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer/attributes.py +0 -0
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer/config.py +0 -0
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer/span_builder.py +0 -0
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer.egg-info/SOURCES.txt +0 -0
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer.egg-info/dependency_links.txt +0 -0
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer.egg-info/requires.txt +0 -0
- {robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: robotframework-tracer
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: OpenTelemetry distributed tracing for Robot Framework
|
|
5
5
|
Author: Robot Framework Tracer Contributors
|
|
6
6
|
License: Apache-2.0
|
|
@@ -116,11 +116,14 @@ export OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
|
|
|
116
116
|
export OTEL_SERVICE_NAME=my-tests
|
|
117
117
|
robot --listener robotframework_tracer.TracingListener tests/
|
|
118
118
|
|
|
119
|
-
# With inline options (
|
|
120
|
-
robot --listener "robotframework_tracer.TracingListener:service_name=my-tests
|
|
119
|
+
# With inline options (colon-separated key=value pairs)
|
|
120
|
+
robot --listener "robotframework_tracer.TracingListener:service_name=my-tests:capture_logs=true" tests/
|
|
121
|
+
|
|
122
|
+
# With custom endpoint (URL colons are automatically handled)
|
|
123
|
+
robot --listener "robotframework_tracer.TracingListener:endpoint=http://jaeger:4318/v1/traces:service_name=my-tests" tests/
|
|
121
124
|
```
|
|
122
125
|
|
|
123
|
-
> **Note:** Robot Framework splits listener arguments on `:`. URLs containing `://` are automatically reconstructed
|
|
126
|
+
> **Note:** Robot Framework splits listener arguments on `:`. Use colons to separate options. URLs containing `://` are automatically reconstructed.
|
|
124
127
|
|
|
125
128
|
### 3. View traces
|
|
126
129
|
|
|
@@ -79,11 +79,14 @@ export OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
|
|
|
79
79
|
export OTEL_SERVICE_NAME=my-tests
|
|
80
80
|
robot --listener robotframework_tracer.TracingListener tests/
|
|
81
81
|
|
|
82
|
-
# With inline options (
|
|
83
|
-
robot --listener "robotframework_tracer.TracingListener:service_name=my-tests
|
|
82
|
+
# With inline options (colon-separated key=value pairs)
|
|
83
|
+
robot --listener "robotframework_tracer.TracingListener:service_name=my-tests:capture_logs=true" tests/
|
|
84
|
+
|
|
85
|
+
# With custom endpoint (URL colons are automatically handled)
|
|
86
|
+
robot --listener "robotframework_tracer.TracingListener:endpoint=http://jaeger:4318/v1/traces:service_name=my-tests" tests/
|
|
84
87
|
```
|
|
85
88
|
|
|
86
|
-
> **Note:** Robot Framework splits listener arguments on `:`. URLs containing `://` are automatically reconstructed
|
|
89
|
+
> **Note:** Robot Framework splits listener arguments on `:`. Use colons to separate options. URLs containing `://` are automatically reconstructed.
|
|
87
90
|
|
|
88
91
|
### 3. View traces
|
|
89
92
|
|
{robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer/listener.py
RENAMED
|
@@ -38,19 +38,20 @@ class TracingListener:
|
|
|
38
38
|
|
|
39
39
|
ROBOT_LISTENER_API_VERSION = 3
|
|
40
40
|
|
|
41
|
-
def __init__(self, *args
|
|
41
|
+
def __init__(self, *args):
|
|
42
42
|
"""Initialize the tracing listener.
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- Keyword arguments: endpoint=..., service_name=...
|
|
47
|
-
- RF listener args: key=value pairs (comma-separated)
|
|
44
|
+
Args are colon-separated key=value pairs from Robot Framework.
|
|
45
|
+
Example: robot --listener "TracingListener:service_name=test:capture_logs=true"
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
For URLs with colons, they are automatically reconstructed:
|
|
48
|
+
Example: robot --listener "TracingListener:endpoint=http://host:4318/v1/traces"
|
|
49
|
+
|
|
50
|
+
Recommended: Use environment variables for endpoints:
|
|
51
|
+
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318/v1/traces
|
|
52
|
+
OTEL_SERVICE_NAME=my-tests
|
|
51
53
|
"""
|
|
52
54
|
parsed_kwargs = self._parse_listener_args(args)
|
|
53
|
-
parsed_kwargs.update(kwargs)
|
|
54
55
|
self.config = TracerConfig(**parsed_kwargs)
|
|
55
56
|
|
|
56
57
|
# Initialize OpenTelemetry with automatic resource detection
|
|
@@ -98,23 +99,35 @@ class TracingListener:
|
|
|
98
99
|
def _parse_listener_args(args):
|
|
99
100
|
"""Parse Robot Framework listener arguments.
|
|
100
101
|
|
|
101
|
-
RF splits arguments on ':'
|
|
102
|
-
|
|
102
|
+
RF splits arguments on ':' and passes each as a separate arg.
|
|
103
|
+
Example: 'listener:endpoint=http://host:4318:service_name=test'
|
|
104
|
+
becomes args = ('endpoint=http', '//host', '4318', 'service_name=test')
|
|
105
|
+
|
|
106
|
+
This method reconstructs URLs and parses key=value pairs.
|
|
103
107
|
"""
|
|
104
108
|
if not args:
|
|
105
109
|
return {}
|
|
106
110
|
|
|
107
|
-
import re
|
|
108
|
-
|
|
109
|
-
# Rejoin with ':' to reconstruct original (RF splits on ':')
|
|
110
|
-
rejoined = ":".join(args)
|
|
111
|
-
|
|
112
|
-
# Match: key=value where value may contain URLs (stops at comma+key= or end)
|
|
113
111
|
kwargs = {}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
112
|
+
i = 0
|
|
113
|
+
while i < len(args):
|
|
114
|
+
arg = args[i]
|
|
115
|
+
|
|
116
|
+
if "=" in arg:
|
|
117
|
+
key, value = arg.split("=", 1)
|
|
118
|
+
# Check if value is start of a URL that got split
|
|
119
|
+
if value in ("http", "https") and i + 1 < len(args) and args[i + 1].startswith("//"):
|
|
120
|
+
# Reconstruct URL: scheme + :// + rest
|
|
121
|
+
url_parts = [value]
|
|
122
|
+
i += 1
|
|
123
|
+
while i < len(args) and "=" not in args[i]:
|
|
124
|
+
url_parts.append(args[i])
|
|
125
|
+
i += 1
|
|
126
|
+
kwargs[key.strip()] = ":".join(url_parts)
|
|
127
|
+
continue
|
|
128
|
+
else:
|
|
129
|
+
kwargs[key.strip()] = value.strip()
|
|
130
|
+
i += 1
|
|
118
131
|
|
|
119
132
|
return kwargs
|
|
120
133
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.4"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: robotframework-tracer
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: OpenTelemetry distributed tracing for Robot Framework
|
|
5
5
|
Author: Robot Framework Tracer Contributors
|
|
6
6
|
License: Apache-2.0
|
|
@@ -116,11 +116,14 @@ export OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
|
|
|
116
116
|
export OTEL_SERVICE_NAME=my-tests
|
|
117
117
|
robot --listener robotframework_tracer.TracingListener tests/
|
|
118
118
|
|
|
119
|
-
# With inline options (
|
|
120
|
-
robot --listener "robotframework_tracer.TracingListener:service_name=my-tests
|
|
119
|
+
# With inline options (colon-separated key=value pairs)
|
|
120
|
+
robot --listener "robotframework_tracer.TracingListener:service_name=my-tests:capture_logs=true" tests/
|
|
121
|
+
|
|
122
|
+
# With custom endpoint (URL colons are automatically handled)
|
|
123
|
+
robot --listener "robotframework_tracer.TracingListener:endpoint=http://jaeger:4318/v1/traces:service_name=my-tests" tests/
|
|
121
124
|
```
|
|
122
125
|
|
|
123
|
-
> **Note:** Robot Framework splits listener arguments on `:`. URLs containing `://` are automatically reconstructed
|
|
126
|
+
> **Note:** Robot Framework splits listener arguments on `:`. Use colons to separate options. URLs containing `://` are automatically reconstructed.
|
|
124
127
|
|
|
125
128
|
### 3. View traces
|
|
126
129
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.2"
|
|
File without changes
|
|
File without changes
|
{robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer/__init__.py
RENAMED
|
File without changes
|
{robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer/attributes.py
RENAMED
|
File without changes
|
{robotframework_tracer-0.2.2 → robotframework_tracer-0.2.4}/src/robotframework_tracer/config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|