feat(node): Add ClickHouse client OpenTelemetry instrumentation#18625
feat(node): Add ClickHouse client OpenTelemetry instrumentation#18625mdhamed238 wants to merge 5 commits intogetsentry:developfrom
Conversation
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you apply the label |
|
Closing due to inactivity after stale warning. Comment or reopen when ready to continue, and use |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable autofix in the Cursor dashboard.
| } catch { | ||
| // Silently ignore errors in stats extraction | ||
| } | ||
| } |
There was a problem hiding this comment.
Repetitive stat-handling code in addExecutionStats
Low Severity
The addExecutionStats function repeats the identical parseInt-then-setAttribute pattern seven times (one for each stat field). A data-driven approach—mapping summary keys to attribute constants and iterating—would reduce ~42 lines to ~10, making it easier to add new stats and ensuring any future fix to the parsing logic is applied consistently.


Implements OpenTelemetry instrumentation for the
@clickhouse/clientpackage to automatically trace database operations.Changes
query,insert,exec, andcommandmethodsmaxQueryLengthandcaptureQueryTextoptionsdbName,peerName, andpeerPortconfigresponseHookfor custom span enrichmentChecklist
yarn lintpassesyarn testpassesCloses #15966