Skip to content

Add debug logging for connector-service feature flags request and response#1462

Merged
gopalldb merged 1 commit into
databricks:mainfrom
gopalldb:fix/log-connector-service-feature-flags-response
May 21, 2026
Merged

Add debug logging for connector-service feature flags request and response#1462
gopalldb merged 1 commit into
databricks:mainfrom
gopalldb:fix/log-connector-service-feature-flags-response

Conversation

@gopalldb
Copy link
Copy Markdown
Collaborator

Summary

Adds debug-level logging for the connector-service feature flags endpoint:

  1. Request: Logs the endpoint URL and User-Agent header before the HTTP call
  2. Response: Logs the full JSON response body on success

This helps diagnose feature flag rollout issues — e.g., which version the driver reports to connector-service, which flags are returned, and whether version-gating is filtering expected flags.

Example output at LogLevel=6:

Fetching feature flags from connector-service: endpoint=https://host/api/2.0/connector-service/feature-flags/OSS_JDBC/3.4.1, User-Agent=DatabricksJDBC/3.4.1 ...
Feature flags response from connector-service (endpoint=...): {"flags":[{"name":"...enableTelemetryForJdbc","value":"true"},...],"ttlSeconds":900}

NO_CHANGELOG=true

Test plan

  • DatabricksConnectionContextTest — 131 tests pass

This pull request was AI-assisted by Isaac.

@gopalldb gopalldb force-pushed the fix/log-connector-service-feature-flags-response branch from bd88019 to f491ed6 Compare May 21, 2026 11:22
Copy link
Copy Markdown
Collaborator

@msrathore-db msrathore-db left a comment

Choose a reason for hiding this comment

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

LGTM

Log endpoint URL and parsed response after successful fetch. Added
toString() to FeatureFlagsResponse and FeatureFlagEntry for readable
log output.

Example: Feature flags from connector-service: endpoint=.../OSS_JDBC/3.4.1, FeatureFlagsResponse{flags=[enableTelemetryForJdbc=true, enableSqlExecForJdbc=false], ttlSeconds=900}

NO_CHANGELOG=true

Co-authored-by: Isaac
Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
@gopalldb gopalldb force-pushed the fix/log-connector-service-feature-flags-response branch from f491ed6 to 55f8ae7 Compare May 21, 2026 11:28
@gopalldb gopalldb merged commit f01fe58 into databricks:main May 21, 2026
15 of 16 checks passed
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.

2 participants