Hi! I forgot to ever present myself. I'm Alejandro, AI Engineer at Inditex.
Hi! I don't know if there is a bug, but since we have changed to use phoenix-client self hosted instead of the whole server in our container we had to change to the log_spans function as log_traces is not supported in the client and now that we are trying to log spans into non-existent projects, the project is not being created. It used to be created automatically whenever we chose a project identifier that didn't exist but now it returns an error
2025-10-06T13:16:10.9171691Z stderr F self.client.spans.log_spans(
2025-10-06T13:16:10.9171713Z stderr F ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
2025-10-06T13:16:10.9171733Z stderr F project_identifier=self.project, spans=self.trace_list
2025-10-06T13:16:10.9171754Z stderr F ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-06T13:16:10.9171987Z stderr F )
2025-10-06T13:16:10.9172010Z stderr F ^
2025-10-06T13:16:10.9172041Z stderr F File "/app/.venv/lib/python3.13/site-packages/phoenix/client/resources/spans/__init__.py", line 475, in log_spans
2025-10-06T13:16:10.9172064Z stderr F response.raise_for_status()
2025-10-06T13:16:10.9172085Z stderr F ~~~~~~~~~~~~~~~~~~~~~~~~~^^
2025-10-06T13:16:10.9172106Z stderr F File "/app/.venv/lib/python3.13/site-packages/httpx/_models.py", line 829, in raise_for_status
2025-10-06T13:16:10.9172309Z stderr F raise HTTPStatusError(message, request=request, response=self)
2025-10-06T13:16:10.9172350Z stderr F httpx.HTTPStatusError: Client error '404 Not Found' for url 'http://localhost/monitoring/v1/projects/executorai/spans'
2025-10-06T13:16:10.9172380Z stderr F For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404
Is it a problem on our end or is it a bug?
Thank you so much!
Hello! We have a self hosted phoenix-client in azure that is redirected through a proxy so the root path is /monitoring. We are correctly doing
- name: PHOENIX_HOST_ROOT_PATH
value: /monitoringto change it as env variable during deployment but when we press the button share in a trace the output given doesn't contain the root path so when sharing with another people of the team they have to enter the phoenix an search for the trace or add the /monitoring by hand. Is it a problem with the current phoenix-client implementation or should we add another env variable/make any changes?
Hi! Why does the package arize-phoenix-client not have an implementation of log_traces? The problem with this is that we are changing our implementation to self host with the arize-phoenix-client package to avoid overhead and because log_traces is not implemented we are using instead log_spans, but since the log_spans function wasn't implemented until arize-phoenix 10.12.0, this makes so it is no longer backwards compatible with our servers that have a previous version deployed.
RunLLM I would want to add the traces in this way to be backwards compatible with our previous implementation with the whole arize-phoenix
trace = {
"name": name,
"attributes": {
"input": {
"value": input_data,
"mime_type": input_mime_type
},
"output": {
"value": output,
"mime_type": output_mime_type
}
},
"start_time": start_time,
"end_time": time.time(),
"status_code": "OK",
"status_message": None,
"context": {
"trace_id": execution_id,
"span_id": span_id,
},
"span_kind": "CHAIN",
"parent_id": self.parent_span_id,
}The problem is that whenever i add parent_id, status_message or the attributes dict it fails, how should the trace be constructed? I am not able to find an standard in the docs
Hi! We are trying to use the phoenix client for our application with self hosted phoenix in docker instead of just having the whole phoenix package but we are having some problems when trying to log traces:
There is not function log_traces in the phoenix client, for a workaround we thought to use the log_spans that is included in the client and use a span dict similar to the one appearing in the docs
This log_spans is still not working, even when we try the examples appearing in the docs to log a span like this it is still failing:
# Log spans
>>> spans = [
... {
... "id": "1",
... "name": "test",
... "context": {"trace_id": "123", "span_id": "456"},
... }
... ]
>>> result = client.spans.log_spans(
... project_identifier="my-project",
... spans=spans
... )File "/app/src/tracing.py", line 245, in log_traces 2025-07-18T08:37:04.406023514Z self.client.spans.log_spans(project_identifier=self.project, spans=spans_test) 2025-07-18T08:37:04.406024556Z ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-07-18T08:37:04.406025556Z File "/app/.venv/lib/python3.13/site-packages/phoenix/client/resources/spans/__init__.py", line 477, in log_spans 2025-07-18T08:37:04.406026639Z result = _parse_log_spans_response(response, spans) 2025-07-18T08:37:04.406027598Z File "/app/.venv/lib/python3.13/site-packages/phoenix/client/resources/spans/__init__.py", line 1103, in _parse_log_spans_response 2025-07-18T08:37:04.406033598Z _raise_log_spans_error(error_response) 2025-07-18T08:37:04.406035431Z ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ 2025-07-18T08:37:04.406036431Z File "/app/.venv/lib/python3.13/site-packages/phoenix/client/resources/spans/__init__.py", line 1186, in _raise_log_spans_error 2025-07-18T08:37:04.406037514Z raise SpanCreationError( 2025-07-18T08:37:04.406038431Z ...<7 lines>... 2025-07-18T08:37:04.406039431Z ) 2025-07-18T08:37:04.406040306Z phoenix.client.exceptions.SpanCreationError: Failed to queue 4 invalid spans: 2025-07-18T08:37:04.406041348Z - Span 456: Field required 2025-07-18T08:37:04.406042264Z - Span 456: Field required 2025-07-18T08:37:04.406043181Z - Span 456: Field required 2025-07-18T08:37:04.406044098Z - Span 456: Field required And when we tried to log our own spans that response is: phoenix.client.exceptions.SpanCreationError: Failed to queue 2 invalid spans: 2025-07-18T08:39:51.549170011Z - Span fd009643dec342d1b8c15b180ac756f5: Input should be a valid string 2025-07-18T08:39:51.549171302Z - Span e43bf40ea0f84803a10c3be95578fe90: Input should be a valid string How can we use the arize-phoenix-client to log our spans? We would like to avoid using the whole arize-phoenix package to reduce overhead. Thank you so much!!
