robotframework-tracer 0.2.2__py3-none-any.whl → 0.2.3__py3-none-any.whl

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.
@@ -98,23 +98,35 @@ class TracingListener:
98
98
  def _parse_listener_args(args):
99
99
  """Parse Robot Framework listener arguments.
100
100
 
101
- RF splits arguments on ':' which breaks URLs like http://host:port.
102
- This method reconstructs the original string and parses key=value pairs.
101
+ RF splits arguments on ':' and passes each as a separate arg.
102
+ Example: 'listener:endpoint=http://host:4318:service_name=test'
103
+ becomes args = ('endpoint=http', '//host', '4318', 'service_name=test')
104
+
105
+ This method reconstructs URLs and parses key=value pairs.
103
106
  """
104
107
  if not args:
105
108
  return {}
106
109
 
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
110
  kwargs = {}
114
- pattern = r"(\w+)=([^,]*?)(?=,\w+=|$)"
115
- for match in re.finditer(pattern, rejoined):
116
- key, value = match.groups()
117
- kwargs[key.strip()] = value.strip()
111
+ i = 0
112
+ while i < len(args):
113
+ arg = args[i]
114
+
115
+ if "=" in arg:
116
+ key, value = arg.split("=", 1)
117
+ # Check if value is start of a URL that got split
118
+ if value in ("http", "https") and i + 1 < len(args) and args[i + 1].startswith("//"):
119
+ # Reconstruct URL: scheme + :// + rest
120
+ url_parts = [value]
121
+ i += 1
122
+ while i < len(args) and "=" not in args[i]:
123
+ url_parts.append(args[i])
124
+ i += 1
125
+ kwargs[key.strip()] = ":".join(url_parts)
126
+ continue
127
+ else:
128
+ kwargs[key.strip()] = value.strip()
129
+ i += 1
118
130
 
119
131
  return kwargs
120
132
 
@@ -1 +1 @@
1
- __version__ = "0.2.2"
1
+ __version__ = "0.2.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: robotframework-tracer
3
- Version: 0.2.2
3
+ Version: 0.2.3
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 (comma-separated key=value pairs)
120
- robot --listener "robotframework_tracer.TracingListener:service_name=my-tests,capture_logs=true" 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 by the listener.
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
 
@@ -0,0 +1,10 @@
1
+ robotframework_tracer/__init__.py,sha256=cZh3xnNaYhRisrqqWH5Gdt4zsgpbh1mUALJiUtGNG8M,204
2
+ robotframework_tracer/attributes.py,sha256=_pDHYBJs4QLrnR3Sms7_QyM9IGYHSjZekr-8fkAosBo,3806
3
+ robotframework_tracer/config.py,sha256=4Dis_UlhSaXkO4ln2VeAMIyvFBy_BD3Og9lI9MWXpnA,2530
4
+ robotframework_tracer/listener.py,sha256=hjqPOa4EfM3K0O8huUuD7UF4tIbnvZ5MQOLsZEHzvLo,11895
5
+ robotframework_tracer/span_builder.py,sha256=4c3bOpUgVwSPoM3bh3Hl0Dfq2BxOWs_GQsFh9lvE7r8,4836
6
+ robotframework_tracer/version.py,sha256=PNiDER4qM19h9zdsdfgKt2_dT4WgYK7EguJ8RU2qA_g,22
7
+ robotframework_tracer-0.2.3.dist-info/METADATA,sha256=HNhIFkN72EFlu0-_wg_HrZISZXGRNfc0KKLCLWf3b7o,9393
8
+ robotframework_tracer-0.2.3.dist-info/WHEEL,sha256=WnJ8fYhv8N4SYVK2lLYNI6N0kVATA7b0piVUNvqIIJE,91
9
+ robotframework_tracer-0.2.3.dist-info/top_level.txt,sha256=G1sMKH-8SM_CdJe0Wm6wa_rg1uo62jfhft_UfaxZ05I,22
10
+ robotframework_tracer-0.2.3.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- robotframework_tracer/__init__.py,sha256=cZh3xnNaYhRisrqqWH5Gdt4zsgpbh1mUALJiUtGNG8M,204
2
- robotframework_tracer/attributes.py,sha256=_pDHYBJs4QLrnR3Sms7_QyM9IGYHSjZekr-8fkAosBo,3806
3
- robotframework_tracer/config.py,sha256=4Dis_UlhSaXkO4ln2VeAMIyvFBy_BD3Og9lI9MWXpnA,2530
4
- robotframework_tracer/listener.py,sha256=1GzNKvzaZnkFAsXeSBR80XXYI69ApzN_A2G3Ol6r8kI,11388
5
- robotframework_tracer/span_builder.py,sha256=4c3bOpUgVwSPoM3bh3Hl0Dfq2BxOWs_GQsFh9lvE7r8,4836
6
- robotframework_tracer/version.py,sha256=m6kyaNpwBcP1XYcqrelX2oS3PJuOnElOcRdBa9pEb8c,22
7
- robotframework_tracer-0.2.2.dist-info/METADATA,sha256=1QAHLrTVMk7Qof4FD48jfs8jYHF7CLa0R7EcYzcOCxk,9190
8
- robotframework_tracer-0.2.2.dist-info/WHEEL,sha256=WnJ8fYhv8N4SYVK2lLYNI6N0kVATA7b0piVUNvqIIJE,91
9
- robotframework_tracer-0.2.2.dist-info/top_level.txt,sha256=G1sMKH-8SM_CdJe0Wm6wa_rg1uo62jfhft_UfaxZ05I,22
10
- robotframework_tracer-0.2.2.dist-info/RECORD,,