You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by "milesbxf (via GitHub)" <gi...@apache.org> on 2026/03/26 11:12:41 UTC
[PR] Add HTTPTransport setting to gremlin-go driver [tinkerpop]
milesbxf opened a new pull request, #3360:
URL: https://github.com/apache/tinkerpop/pull/3360
## Why
There's currently no way to instrument the HTTP transport layer in gremlin-go. Users who need connection pool monitoring, request tracing, or custom metrics have no extension point — the `http.Transport` is created internally and not exposed.
This is particularly useful for diagnosing latency spikes caused by connection pool exhaustion under load.
## What
Adds an `HTTPTransport http.RoundTripper` field to `ClientSettings` and `DriverRemoteConnectionSettings`. When set, the driver uses it directly instead of creating its own transport. When nil, behaviour is unchanged.
## Test plan
- [x] New tests: custom transport is used, nil falls back to default, pool settings ignored with custom transport, wiring from both ClientSettings and DriverRemoteConnectionSettings
- [x] Existing tests pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add HTTPTransport setting to gremlin-go driver [tinkerpop]
Posted by "kenhuuu (via GitHub)" <gi...@apache.org>.
kenhuuu commented on code in PR #3360:
URL: https://github.com/apache/tinkerpop/pull/3360#discussion_r4364116159
##########
gremlin-go/driver/connection.go:
##########
@@ -67,7 +119,24 @@ const (
)
func newConnection(handler *logHandler, url string, connSettings *connectionSettings) *connection {
- // Apply defaults for zero values
+ var rt http.RoundTripper
+ if connSettings.httpTransport != nil {
Review Comment:
Replacing the transport here silently disables the driver’s TLS, connection timeout, pooling, keep-alive, and idle-timeout settings. That seems especially surprising for instrumentation, where users generally want to wrap the configured transport without changing its behavior. Could this instead be a decorator such as `func(http.RoundTripper) http.RoundTripper`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add HTTPTransport setting to gremlin-go driver [tinkerpop]
Posted by "kenhuuu (via GitHub)" <gi...@apache.org>.
kenhuuu commented on PR #3360:
URL: https://github.com/apache/tinkerpop/pull/3360#issuecomment-6374581182
Hi @milesbxf , sorry for the delayed review.
This PR has diverged significantly from current master. Since it was opened, gremlin-go’s connection options were standardized with the other GLVs, adding behavior such as ReadTimeout, proxy handling, etc. After rebasing, directly replacing the http.RoundTripper would bypass much of that standardized behavior, including the custom idle-read timeout and environment proxy support. The instrumentation goal remains valid, but the implementation should be reconsidered as a transport decorator.
Are you still interested in this functionality and are still willing to help implement this change? Could you let us know within a week or so whether you can help with this? If we don't hear back then we'll likely close this PR and capture this in a TinkerPop Jira.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add HTTPTransport setting to gremlin-go driver [tinkerpop]
Posted by "Cole-Greer (via GitHub)" <gi...@apache.org>.
Cole-Greer commented on PR #3360:
URL: https://github.com/apache/tinkerpop/pull/3360#issuecomment-4136616313
Hi @milesbxf,
Thanks for submitting this PR. Before getting into the changes, I wanted to let you know that we are currently in code freeze in preparation for a set of releases (3.7.6, 3.8.1, and 4.0.0-beta.2) next week, and are not currently considering new submissions for these releases. Your changes here will be considered for the following release cycle.
I did want to ask about which version you intend to target with your changes. If you're unfamiliar with our branching strategy, `3.7-dev` accumulates changes for the 3.7.x release line, `3.8-dev` for 3.8.x, and `master` is currently accumulating changes for `4.0.0`. If you want to target multiple release lines, we ask you target the oldest branch, and we will merge the changes up to later releases for you after your PR is merged.
Gremlin-go looks very different under the hood in TinkerPop 4 (`master`) compared to 3.x.x, as TinkerPop 4 uses HTTP as a transport, while TinkerPop 3 uses WebSockets. Is your intention here to contribute instrumentation solely to gremlin-go 4, or did you want to add it to an existing 3.7.x/3.8.x release line which you are currently using? If you are looking for instrumentation in TinkerPop 3, I would ask that you open an additional PR targetting either `3.7-dev` or `3.8-dev` with a websockets implementation, in addition to this HTTP implementation for TinkerPop 4.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add HTTPTransport setting to gremlin-go driver [tinkerpop]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3360:
URL: https://github.com/apache/tinkerpop/pull/3360#issuecomment-4136638822
## [Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/3360?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 77.49%. Comparing base ([`cfd6889`](https://app.codecov.io/gh/apache/tinkerpop/commit/cfd68897ea111e3ae7100dbc2f0f7a364fd0ffa5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7886e8f`](https://app.codecov.io/gh/apache/tinkerpop/commit/7886e8f0bf207cb3a01c0f773fa4a6efcaab3527?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 917 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #3360 +/- ##
============================================
- Coverage 77.87% 77.49% -0.38%
============================================
Files 1015 26 -989
Lines 59308 5541 -53767
Branches 6835 0 -6835
============================================
- Hits 46184 4294 -41890
+ Misses 10817 1043 -9774
+ Partials 2307 204 -2103
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/tinkerpop/pull/3360?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add HTTPTransport setting to gremlin-go driver [tinkerpop]
Posted by "GumpacG (via GitHub)" <gi...@apache.org>.
GumpacG commented on PR #3360:
URL: https://github.com/apache/tinkerpop/pull/3360#issuecomment-4879534348
Hey @milesbxf, thanks for the contribution. Could you also add to the [upgrade docs](https://github.com/apache/tinkerpop/blob/master/docs/src/upgrade/release-4.x.x.asciidoc) and [gremlin variants docs](https://github.com/apache/tinkerpop/blob/master/docs/src/reference/gremlin-variants.asciidoc)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org