-
Notifications
You must be signed in to change notification settings - Fork 20
track how many rows are inserted into clickhouse #235
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
track how many rows are inserted into clickhouse #235
Conversation
WalkthroughThe changes introduce new Prometheus counters to track the number of rows inserted into various ClickHouse tables, including main storage, transactions, logs, and traces. The ClickHouse insertion methods are updated to increment these counters upon successful data insertion, enhancing observability without altering existing logic or control flow. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant ClickHouseConnector
participant Metrics
Client->>ClickHouseConnector: insertTransactions / insertLogs / insertTraces / InsertBlockData
ClickHouseConnector->>ClickHouse: Insert rows
alt Insert successful
ClickHouseConnector->>Metrics: Increment relevant counter(s) by number of rows inserted
end
ClickHouseConnector-->>Client: Return result
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Graph Analysis (1)internal/storage/clickhouse.go (1)
🔇 Additional comments (6)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
TL;DR
Added Prometheus metrics to track ClickHouse insert operations.
What changed?
metrics.go
to track ClickHouse insert operations:clickhouse_main_storage_rows_inserted_total
clickhouse_transactions_inserted_total
clickhouse_logs_inserted_total
clickhouse_traces_inserted_total
How to test?
Why make this change?
These metrics provide visibility into the volume of data being inserted into ClickHouse, which is crucial for monitoring system performance and data processing rates. This information helps with capacity planning, identifying bottlenecks, and ensuring the system is operating efficiently.
Summary by CodeRabbit