Skip to content

Add ErrorCategory type and constants for telemetry error classification#414

Merged
samikshya-db merged 2 commits into
mainfrom
prathamesh/PECOBLR-3537-telemetry-error-category
Jul 20, 2026
Merged

Add ErrorCategory type and constants for telemetry error classification#414
samikshya-db merged 2 commits into
mainfrom
prathamesh/PECOBLR-3537-telemetry-error-category

Conversation

@prathamesh-db

Copy link
Copy Markdown
Collaborator

What

Adds an internal ErrorCategory string type in internal/errors with the
category constants used to classify driver errors for telemetry:

Why

classifyError currently infers a category by substring-matching the error
message which is fragile and lossy. The goal is to declare the category at the error
source and have classifyError read it directly. This PR adds only the
category type and constants.

Design doc: https://docs.google.com/document/d/12ufP1eZrgFxWt6xzINfkhfrE-NnhB29zCa5PKokVfp8/edit
Jira: PECOBLR-3537

First step of PECOBLR-3537 (enrich go-driver telemetry codes). Adds an
internal ErrorCategory string type in internal/errors with 21 category
constants: the 9 values telemetry.classifyError already emits, preserved
byte-for-byte, plus 12 new categories mirroring the JDBC driver's
DatabricksDriverErrorCode taxonomy.

No behavior change: the type is not read or attached anywhere yet. This
is deliberately the smallest possible first PR; the mechanism (reading
the category in classifyError) and tagging at error-source sites land in
follow-up PRs.

Signed-off-by: Prathamesh Baviskar <prathamesh.baviskar@databricks.com>
@prathamesh-db prathamesh-db self-assigned this Jul 20, 2026
Replace the #XXXX placeholder with the real PR number and tighten the
wording.

Signed-off-by: Prathamesh Baviskar <prathamesh.baviskar@databricks.com>

@samikshya-db samikshya-db left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Congrats on your first PR, @prathamesh-db 🥳 This is a good start for now, let's polish this as we wire this in the code base.

@samikshya-db
samikshya-db merged commit d1d0e62 into main Jul 20, 2026
11 checks passed
@samikshya-db
samikshya-db deleted the prathamesh/PECOBLR-3537-telemetry-error-category branch July 20, 2026 09:19
mani-mathur-arch added a commit that referenced this pull request Jul 21, 2026
Bring PR #412 up to date with main (it was BEHIND, no conflicts). main
advanced by #414, which adds the ErrorCategory telemetry type in a new file
(internal/errors/category.go) that does not overlap this branch's changes, so
the merge is a clean auto-merge.

Verified: default pure-Go build (go build ./...) and go vet ./internal/errors/
both clean on the merged tree.

Co-authored-by: Isaac
Signed-off-by: Mani Kaustubh Mathur <mani.mathur@databricks.com>
mani-mathur-arch added a commit that referenced this pull request Jul 21, 2026
Bring PR #409 up to date after #412 (SEA PuPr tail: proxy / retry / max-chunks /
telemetry) and #414 (ErrorCategory) landed on main. #409 and #412 both branched
off #399 and extend the same kernel option surface, so the merge conflicted on
8 files; every conflict is additive-vs-additive and resolved by keeping both
sides:

- KERNEL_REV — re-pin to the #169 kernel tip 760625b, the only rev that carries
  BOTH #169's symbols (mTLS set_tls_client_certificate + abi_version, which
  #409's own code links) AND #178's set_retry_config (which the merged-in #412
  code links). main's 9ac3f3d lacks the former; the old pin 12919b3 lacks the
  latter. 760625b = 12919b3's work + merged #178, same #169 lineage.
- internal/config/config.go, internal/backend/kernel/config.go, connector.go,
  doc.go, kernel_config.go — keep both option families (mTLS client cert from
  #409; proxy / retry-overall-timeout / max-chunks from #412). The connector
  reject message and the ProxyURL doc take main's forward-looking wording.
- kernel_test.go, kernel_experimental_test.go — de-interleave the spliced test
  additions (ABI-version test vs proxy/retry tests; disposition-map, option, and
  DeepCopy cases) into complete units, keeping every test from both.

Verified on BOTH build paths: default pure-Go (go build/test ./...) and tagged
(-tags databricks_kernel, linking the .a rebuilt at 760625b) — build, vet, and
the touched-package tests all green. TestKernelExperimentalFieldsClassified
passes, confirming no experimental field was dropped in the merge.

Co-authored-by: Isaac
Signed-off-by: Mani Kaustubh Mathur <mani.mathur@databricks.com>
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