GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — feat(node): add ClickHouse instrumentation by adityareddy-dev · Pull Request #26211 · getsentry/sentry-javascript Conversation
| ||||||||||||||
|
@JPeer264 can you approve the workflows on the latest push? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@adityareddy-dev done. Btw I'll review that next week as something else came in this week. Also I'm not too familiar with clickhouse, so I have to go a bit deeper into it to give a proper review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for integrating this. It looks pretty good already - I found couple of things that are worth to fix.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| @@ -0,0 +1,367 @@ | |||
| let integerLiteralRE: RegExp | undefined; | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Was there any specific reason to move this into it's own file? I would assume it was because of the max-lines linting rule? If so, you can simply ignore that at the top of the file, so it is easier to see the actual change. We'll take care in the future and split this up in refactoring PRs where it is only moved.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@adityareddy-dev since some code changes happened, is this ready to re-review again, or are you still on it? No hurries if there is still some work left |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2723867 to
6c3574c
Compare
|
FYI I rebased your branch to latest develop as one check was failing. I think it’s fixed now with the rebase |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, it's ready for another review. The size check still trips the 500-byte limit after the rebase. If the increase looks okay to you, could you add |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I am a bit hesitant about this label. It adds around 1kb for the server runtimes because of the sql additions, which are ClickHouse specific. I'll think another day if we should solve this issue or not. Not sure if this is actually fixable for Node, but for Cloudflare this can be fixed for sure. I'll come back to you with an answer on Monday latest. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Alright this one day was shorter than expected. I hope it's ok - I pushed to the branch and fixed the bugbot comment and also kinda outsourced the SQL adaptions, so it is a bit more modular now. We still increase the SDK for Node, but Cloudflare stays roughly the same as before. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks a lot again for your work
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The sanitizer stopped looking for the FORMAT clause once an INSERT reached SELECT, so rows read through input() stayed in db.query.text. FORMAT is now the data clause anywhere at the top level of an INSERT, unless the token before it expects a name, as in SELECT format or FROM format.
`bun run` does not inject the diagnostics channels, so the ClickHouse suite gets no spans there. It passes in the `node-suites-bun-build` project, which bundles the scenarios with `@sentry/bun/plugin`.
47c7b33 to
03055eb
Compare
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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.
Reviewed by Cursor Bugbot for commit 63a553e. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
… QUALIFY and NOT A column named `format` after these keywords was read as the FORMAT clause of an INSERT, so the query text was cut off there. They now count as tokens after which `format` is a name, like WHERE and AND.
There was an error while loading. Please reload this page.
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #26211 Co-authored-by: JPeer264 <[email protected]>
<!-- Keep the urgency section so automation can prioritize this PR. You may delete other sections you don't need. --> ## DESCRIBE YOUR PR This adds a page for `Sentry.clickhouseIntegration`, the new ClickHouse integration of the JavaScript SDK from getsentry/sentry-javascript#26211 by @adityareddy-dev. Without a page, users can't see which ClickHouse clients and runtimes are traced, or what query data ends up in their spans. It covers: - that the integration is on by default when tracing is enabled - runtime notes: Node.js runtime only on Next.js, the import hook on Deno, and `sentryBunPlugin()` on Bun and Elysia - which client methods are traced (`query`, `command`, `exec`, `insert`) and that spans need an active parent span - span names and attributes, and how query text is sanitized (literals, comments, inline insert data, `{name:Type}` parameters) - Cloudflare Workers: `@clickhouse/client-web` is traced when the Worker is built with the Sentry Cloudflare Vite plugin - supported versions: `@clickhouse/client` and `@clickhouse/client-web` `>=1.1.0 <2` It also adds `clickhouseIntegration` to the integration tables of every server SDK that exports it, next to `typesafeIntegration`, which comes from the same default list. On Cloudflare it isn't enabled by default, so the row has no Auto Enabled mark and a note points to the Vite plugin. Open decisions: - getsentry/sentry-javascript#26211 merged after 11.16.0, so `<AvailableSince version="11.17.0" />` assumes it ships in the next minor. **Merge after 11.17.0 is released.** ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the due date. You can update this information later by editing the PR description. - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've supplied a deadline. Thanks in advance for your help! ## PRE-MERGE CHECKLIST _Make sure you've checked the following before merging your changes:_ - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) <!-- junior-request-attribution:start --> via @JPeer264. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0CA6TD3QRK%3A1794939394.715079 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AC0CA6TD3QRK%3A1794939394.715079) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0CA6TD3QRK%3A1794939394.715079/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Jan Peer Stöcklmair <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Clickhouse instrumentation (@clickhouse/client)
There was an error while loading. Please reload this page.