Skip to content
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

feat: phoenix.otel infers GRPC port from env #6017

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

anticorrelator
Copy link
Contributor

While PHOENIX_GRPC_PORT is typically a server-side variable, this provides an intuitive mechanism to improve the port-inference logic used in phoenix-otel.

We should consider also adding an explicit override that will force using either gRPC or HTTP regardless of endpoint (which would be easier than our original proposed solution of explicitly setting the exporter).

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 13, 2025
@@ -413,7 +412,7 @@ def _construct_http_endpoint(parsed_endpoint: ParseResult) -> ParseResult:


def _construct_grpc_endpoint(parsed_endpoint: ParseResult) -> ParseResult:
return parsed_endpoint._replace(netloc=f"{parsed_endpoint.hostname}:{_DEFAULT_GRPC_PORT}")
return parsed_endpoint._replace(netloc=f"{parsed_endpoint.hostname}:{get_env_grpc_port()}")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think in general this is good - though agree an explicit way is necessary

@anticorrelator anticorrelator merged commit 4e036e7 into main Jan 14, 2025
33 checks passed
@anticorrelator anticorrelator deleted the dustin/phoenix-otel-grpc-port-config branch January 14, 2025 01:07
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] No easy way to change gRPC port on the client side
2 participants