Skip to content

Conversation

@soapun
Copy link
Contributor

@soapun soapun commented Nov 30, 2025

resolves #10416


Note

Avoids stripping existing path prefixes when building HTTP /v1/traces endpoints and adds tests to validate behavior.

  • phoenix-otel:
    • Updates phoenix/otel/otel.py _construct_http_endpoint to preserve existing path prefixes if the URL already ends with /v1/traces; otherwise appends the traces path.
  • Tests:
    • Adds parametrized tests in tests/test_settings.py for _construct_http_endpoint, covering base URL, already-suffixed URL, and prefixed path cases.

Written by Cursor Bugbot for commit 1015813. This will update automatically on new commits. Configure here.

@soapun soapun requested a review from a team as a code owner November 30, 2025 10:19
@github-project-automation github-project-automation bot moved this to 📘 Todo in phoenix Nov 30, 2025
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 30, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 30, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@axiomofjoy
Copy link
Contributor

@soapun Thanks for your contribution. Can you please sign the CLA?

@anticorrelator
Copy link
Contributor

@soapun thanks so much for the contribution! please add the same endpoint prefix preserving logic to _construct_grpc_endpoint

Returns:
ParseResult: Modified endpoint with "/v1/traces" path.
"""
return parsed_endpoint._replace(path="/v1/traces")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same logic should be added to _construct_grpc_endpoint

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paths are irrelevant for gRPC

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_construct_grpc_endpoint overwrites port even if it was specified in url, which can also be a bit misleading.
Maybe add something like:

def _construct_grpc_endpoint(parsed_endpoint: ParseResult) -> ParseResult:
    return parsed_endpoint._replace(netloc=f"{parsed_endpoint.hostname}:{parsed_endpoint.port or get_env_grpc_port()}")

?

@github-project-automation github-project-automation bot moved this from 📘 Todo to 🔍. Needs Review in phoenix Dec 2, 2025
@soapun
Copy link
Contributor Author

soapun commented Dec 3, 2025

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Dec 3, 2025
@github-project-automation github-project-automation bot moved this from 🔍. Needs Review to 👍 Approved in phoenix Dec 3, 2025
@anticorrelator anticorrelator merged commit 14788be into Arize-ai:main Dec 4, 2025
34 of 35 checks passed
@github-project-automation github-project-automation bot moved this from 👍 Approved to ✅ Done in phoenix Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[BUG]: register removes all prefixes from endpoint specified via PHOENIX_COLLECTOR_ENDPOINT

4 participants