Skip to content

Conversation

beriloqueiroz-eco
Copy link

Change Summary

This PR adds support for injecting a custom http.Client into the Typesense Go SDK via a new ClientOption (WithCustomHTTPClient).
This allows users to instrument Typesense HTTP requests with observability tools such as OpenTelemetry, enabling distributed tracing and advanced monitoring.

Added CustomHTTPClient field to ClientConfig
Created WithCustomHTTPClient option for NewClient
Modified client initialization to use the custom client if provided

PR Checklist

Added CustomHTTPClient field to ClientConfig
Created WithCustomHTTPClient option for NewClient
Modified client initialization to use the custom client if provided

Copy link
Contributor

@tharropoulos tharropoulos left a comment

Choose a reason for hiding this comment

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

:shipit:

@kishorenc
Copy link
Member

@beriloqueiroz-eco Sorry just got around to this. The PR is failing a lint check.

@beriloqueiroz-eco
Copy link
Author

Hi @kishorenc ! The lint check failed due to undefined types like api.AnalyticsEventCreateSchema, but I’m not sure why this happened. These types should be defined in the api package, and the import seems correct. Could someone help clarify what’s missing or how to resolve this lint error? Thanks in advance!

@tharropoulos
Copy link
Contributor

The PR didn't fail that check before the API spec changes. It relies on the API spec which has been changed for v30. What we need to do is merge #210 and then merge the upcoming v30 changes and rebase them on this branch. Then it will pass.

@kishorenc
Copy link
Member

Ok let's wait for the other PR to be merged. I want to do one release before that since that PR has breaking changes.

@beriloqueiroz-eco
Copy link
Author

Ok, thanks for the explanation.

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.

3 participants