Skip to content

Commit 02a924a

Browse files
committed
Update documentation for connector-service endpoint
Updated design and feature flag documentation to reflect new endpoint: - DESIGN.md: Updated code example to use connector-service endpoint - ADDING_FEATURE_FLAGS.md: Updated API documentation and response format The documentation now correctly shows: - Endpoint: /api/2.0/connector-service/feature-flags/GOLANG/{version} - Response format with array of flag entries - Removed outdated query parameter references Signed-off-by: Samikshya Chand <samikshya.chand@databricks.com> Signed-off-by: samikshya-chand_data <samikshya.chand@databricks.com>
1 parent 5225027 commit 02a924a

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

telemetry/ADDING_FEATURE_FLAGS.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,21 @@ if enabled {
6262

6363
## How It Works
6464

65-
### Single Request for All Flags
66-
All flags are fetched together in a single HTTP request:
65+
### Connector Service Endpoint
66+
Flags are fetched from the connector-service endpoint with driver name and version:
6767
```
68-
GET /api/2.0/feature-flags?flags=flagOne,flagTwo,flagThree
68+
GET /api/2.0/connector-service/feature-flags/GOLANG/{driverVersion}
69+
```
70+
71+
The response includes all available flags for the driver:
72+
```json
73+
{
74+
"flags": [
75+
{"name": "flagOne", "value": "true"},
76+
{"name": "flagTwo", "value": "false"}
77+
],
78+
"ttl_seconds": 900
79+
}
6980
```
7081

7182
### 15-Minute Cache

telemetry/DESIGN.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,19 +1531,15 @@ func ParseTelemetryConfig(params map[string]string) *Config {
15311531

15321532
```go
15331533
// checkFeatureFlag checks if telemetry is enabled server-side.
1534-
func checkFeatureFlag(ctx context.Context, host string, httpClient *http.Client) (bool, error) {
1535-
endpoint := fmt.Sprintf("https://%s/api/2.0/feature-flags", host)
1534+
func checkFeatureFlag(ctx context.Context, host string, httpClient *http.Client, driverVersion string) (bool, error) {
1535+
// Use connector-service endpoint with driver name and version
1536+
endpoint := fmt.Sprintf("https://%s/api/2.0/connector-service/feature-flags/GOLANG/%s", host, driverVersion)
15361537

15371538
req, err := http.NewRequestWithContext(ctx, "GET", endpoint, nil)
15381539
if err != nil {
15391540
return false, err
15401541
}
15411542

1542-
// Add query parameters
1543-
q := req.URL.Query()
1544-
q.Add("flags", "databricks.partnerplatform.clientConfigsFeatureFlags.enableTelemetryForGoDriver")
1545-
req.URL.RawQuery = q.Encode()
1546-
15471543
resp, err := httpClient.Do(req)
15481544
if err != nil {
15491545
return false, err

0 commit comments

Comments
 (0)