Add ErrorCategory type and constants for telemetry error classification#414
Merged
samikshya-db merged 2 commits intoJul 20, 2026
Merged
Conversation
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>
Replace the #XXXX placeholder with the real PR number and tighten the wording. Signed-off-by: Prathamesh Baviskar <prathamesh.baviskar@databricks.com>
samikshya-db
approved these changes
Jul 20, 2026
samikshya-db
left a comment
Collaborator
There was a problem hiding this comment.
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an internal
ErrorCategorystring type ininternal/errorswith thecategory constants used to classify driver errors for telemetry:
Why
classifyErrorcurrently infers a category by substring-matching the errormessage which is fragile and lossy. The goal is to declare the category at the error
source and have
classifyErrorread it directly. This PR adds only thecategory type and constants.
Design doc: https://docs.google.com/document/d/12ufP1eZrgFxWt6xzINfkhfrE-NnhB29zCa5PKokVfp8/edit
Jira: PECOBLR-3537