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

Properly Handle Custom Http Endpoints #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lou-k
Copy link

@lou-k lou-k commented Oct 27, 2024

In the current version, should_use_http only returns true iff the endpoint url is in the Endpoints enum.
The register_otel function, however, accepts custom hosts as a string:

EndpointsType = Union[str, List[str], Endpoints, List[Endpoints]]

def register_otel(
    endpoints: EndpointsType,

So, if you call register_otel with an endpoint that is not in the Endpoints enum, (say, http://localhost:7000), then should_use_http will return false, even if the user intends to send things over http.

This pull request adjusts should_use_http to consider strings as input types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant