-
Notifications
You must be signed in to change notification settings - Fork 171
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
SNOW-1881874: CLIENT_TELEMETRY_ENABLED is always true and there is no possibility to override it #2029
Comments
I think the simplest way is to make isTelemetryServiceAvailable in TelemetryClient not hardcoded, and receive it from session parameters |
hi and thanks for raising this improvement request with us, the team will consider for further planning. If you perhaps feel like submitting a PR too, that's more than appreciated! Otherwise, will keep this thread posted. |
Sounds good, I will prepare PR |
Thank you for the PR, the team will review. But maybe we don't even need to add any new params; the existing ones should be good enough to be exposed to the user and the client driver modify the behaviour based on it. The team will review the PR as mentioned, and/or suggest an alternative approach. |
Yep I just realized that its not gonna come from server :) I will bring it through LoginInput |
PR ready for review #2034 , added TELEMETRY_SERVICE_AVAILABLE param for session params, and when TELEMETRY_SERVICE_AVAILABLE param is false, telemetry will be disabled |
@sfc-gh-dszmolka PR is ready for review, can someone review it? |
AFAIK the team goes over the community-submitted PRs periodically, so hopefully it gets reviewed in the coming days. Please note we have absolutely no SLA for PR reviews, to appreciate your patience here. |
What is the current behavior?
The issue is that
CLIENT_TELEMETRY_ENABLED
is always set toTRUE
. As a result, the snowflake-jdbc driver will always attempt to send telemetry data, even when it's not possible. When the request fails, telemetry is disabled for the current session.For example:
The root of the problem lies in the
SFStatement
class, specifically in theexecuteQueryInternal
function:This function sends a request to Snowflake to fetch parameters. One of these parameters is
CLIENT_TELEMETRY_ENABLED
, which is always set toTRUE
on the server side. I would like the ability to override this behavior.The result of the request is parsed into a
JsonNode
, and the resultSet variable already containsCLIENT_TELEMETRY_ENABLED == true
.What is the desired behavior?
It should be possible to disable telemetry, similar to how it works for
CLIENT_OUT_OF_BAND_TELEMETRY_ENABLED
.How would this improve
snowflake-jdbc
?Session.builder().configs(..)
.References, Other Background
A similar issue was previously reported for the Snowflake Python Connector and has been resolved:
Issue: #1902
Fix: PR #2013
The text was updated successfully, but these errors were encountered: