Documentation
¶
Index ¶
Constants ¶
View Source
const ( TagWorkspaceID = "workspace.id" TagSessionID = "session.id" TagDriverVersion = "driver.version" TagDriverOS = "driver.os" TagDriverRuntime = "driver.runtime" TagServerAddress = "server.address" // Not exported to Databricks )
Tag names for connection metrics
View Source
const ( TagStatementID = "statement.id" TagResultFormat = "result.format" TagResultChunkCount = "result.chunk_count" TagResultBytesDownloaded = "result.bytes_downloaded" TagCompressionEnabled = "result.compression_enabled" TagPollCount = "poll.count" TagPollLatency = "poll.latency_ms" )
Tag names for statement metrics
View Source
const ( TagErrorType = "error.type" TagErrorCode = "error.code" )
Tag names for error metrics
View Source
const ( TagFeatureCloudFetch = "feature.cloudfetch" TagFeatureLZ4 = "feature.lz4" TagFeatureDirectResults = "feature.direct_results" )
Feature flag tags
Variables ¶
View Source
var ErrCircuitOpen = errors.New("circuit breaker is open")
ErrCircuitOpen is returned when circuit is open.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Enabled controls whether telemetry is active
Enabled bool
// EnableTelemetry is the client-side telemetry preference.
// Uses config overlay pattern: client > server > default
// - Unset: use server feature flag (default behavior)
// - Set to true: client wants telemetry enabled (overrides server)
// - Set to false: client wants telemetry disabled (overrides server)
EnableTelemetry config.ConfigValue[bool]
// BatchSize is the number of metrics to batch before flushing
BatchSize int
// FlushInterval is how often to flush metrics
FlushInterval time.Duration
// MaxRetries is the maximum number of retry attempts
MaxRetries int
// RetryDelay is the base delay between retries
RetryDelay time.Duration
// CircuitBreakerEnabled enables circuit breaker protection
CircuitBreakerEnabled bool
// CircuitBreakerThreshold is failures before opening circuit
CircuitBreakerThreshold int
// CircuitBreakerTimeout is time before retrying after open
CircuitBreakerTimeout time.Duration
}
Config holds telemetry configuration.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns default telemetry configuration. Note: Telemetry uses config overlay - controlled by server feature flags by default. Clients can override by explicitly setting enableTelemetry=true/false.
func ParseTelemetryConfig ¶
ParseTelemetryConfig extracts telemetry config from connection parameters.
Click to show internal directories.
Click to hide internal directories.