-
Notifications
You must be signed in to change notification settings - Fork 651
fix: do not remove endpoint prefix before /v1/traces
#10417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: do not remove endpoint prefix before /v1/traces
#10417
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
@soapun Thanks for your contribution. Can you please sign the CLA? |
|
@soapun thanks so much for the contribution! please add the same endpoint prefix preserving logic to |
| Returns: | ||
| ParseResult: Modified endpoint with "/v1/traces" path. | ||
| """ | ||
| return parsed_endpoint._replace(path="/v1/traces") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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()}")?
|
I have read the CLA Document and I hereby sign the CLA |
resolves #10416
Note
Avoids stripping existing path prefixes when building HTTP
/v1/tracesendpoints and adds tests to validate behavior.phoenix/otel/otel.py_construct_http_endpointto preserve existing path prefixes if the URL already ends with/v1/traces; otherwise appends the traces path.tests/test_settings.pyfor_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.