-
Notifications
You must be signed in to change notification settings - Fork 631
feat(client-v2-otel): add OpenTelemetry span recorder module #3065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
chernser
merged 7 commits into
main
from
polyglot/client-v2-opentelemetry-span-recorder
Aug 26, 2026
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b3c8c8a
feat(client-v2-otel): add OpenTelemetry span recorder module
polyglotAI-bot 2ff0347
Address review feedback: scope-name javadoc and lazy-global test
polyglotAI-bot 2fa2962
Implement SpanRecorder directly instead of extending DefaultSpanRecorder
polyglotAI-bot ddce5b6
Simplify the recorder: SpanSupport member, constructors only
polyglotAI-bot 31e2187
Move the OpenTelemetry recorder into client-v2 with compile-only deps
polyglotAI-bot bc5189b
Separate the span recorder's success callback by operation type
polyglotAI-bot 6d5dc4c
Make the operation kind of OperationMetrics mandatory
polyglotAI-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
28 changes: 28 additions & 0 deletions
28
client-v2/src/main/java/com/clickhouse/client/api/metrics/OperationType.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| package com.clickhouse.client.api.metrics; | ||
|
|
||
| /** | ||
| * Kind of client operation a set of {@link OperationMetrics} was collected for. | ||
| * <p> | ||
| * The kind decides which metrics of the operation are meaningful: a read operation reports how much | ||
| * the server read and returned, an insert reports how much the server wrote. | ||
| */ | ||
| public enum OperationType { | ||
|
|
||
| /** | ||
| * Operation the client ran as a statement - a query, a command, a ping or a table-schema lookup. | ||
| * It is the kind of the call the application made, not of the work the server did: a command that | ||
| * writes, such as {@code INSERT INTO ... SELECT}, is run as a statement and is reported here. | ||
| */ | ||
| QUERY, | ||
|
|
||
| /** | ||
| * Operation the client ran as an insert, through one of the {@code insert} methods. | ||
| */ | ||
| INSERT, | ||
|
|
||
| /** | ||
| * Kind of the operation is not known. Reported for metrics that were created without one, which | ||
| * the client itself never does. | ||
| */ | ||
| UNKNOWN | ||
| } |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.