On Windows, pip install git+https://github.com/hiddenswitch/ComfyUI.git
Start a local collector.
Run OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 comfyui
Observe that forward slashes are inexplicably replaced with backslashes, breaking automatic configuration.
What is the expected behavior?
I should be able to set the endpoint URL in Windows the same way I do in Linux.
What is the actual behavior?
Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\opentelemetry\sdk\trace\export\__init__.py", line 367, in _export_batch
self.span_exporter.export(self.spans_list[:idx]) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\opentelemetry\exporter\otlp\proto\http\trace_exporter\__init__.py", line 145, in export
resp = self._export(serialized_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\opentelemetry\exporter\otlp\proto\http\trace_exporter\__init__.py", line 114, in _export
return self._session.post(
^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\requests\sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\requests\sessions.py", line 575, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\requests\sessions.py", line 486, in prepare_request
p.prepare(
File "C:\Python311\Lib\site-packages\requests\models.py", line 368, in prepare
self.prepare_url(url, params)
File "C:\Python311\Lib\site-packages\requests\models.py", line 445, in prepare_url
raise InvalidURL(f"Invalid URL {url!r}: No host supplied")
requests.exceptions.InvalidURL: Invalid URL 'http:\\\\otlp-collector.monitoring.svc.cluster.local:4318/v1/traces': No host supplied
Describe your environment
python: 3.11 Windows 2022 Server Windows Containers on Windows
Steps to reproduce
pip install git+https://github.com/hiddenswitch/ComfyUI.git
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 comfyui
What is the expected behavior? I should be able to set the endpoint URL in Windows the same way I do in Linux.
What is the actual behavior?
Additional context This is how the tracer is initialized: https://github.com/hiddenswitch/ComfyUI/blob/3a64e04a9339d6797106b1c5f444c76dab2614dc/comfy/cmd/main_pre.py#L48