Skip to content
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

metrics(ticdc): refine exp boundary, record large row from 2k size #7861

Merged
merged 3 commits into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cdc/sinkv2/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"github.com/prometheus/client_golang/prometheus"
)

// rowSizeLowBound is set to 128K, only track data event with size not smaller than it.
const largeRowSizeLowBound = 128 * 1024
// rowSizeLowBound is set to 2K, only track data event with size not smaller than it.
const largeRowSizeLowBound = 2 * 1024

// ---------- Metrics used in Statistics. ---------- //
var (
Expand All @@ -42,7 +42,7 @@ var (
Subsystem: "sinkv2",
Name: "large_row_size",
Help: "The size of all received row changed events (in bytes).",
Buckets: prometheus.ExponentialBuckets(largeRowSizeLowBound, 2, 10), // 128K~128M
Buckets: prometheus.ExponentialBuckets(largeRowSizeLowBound, 2, 15), // 2K~32M
}, []string{"namespace", "changefeed", "type"}) // type is for `sinkType`

// ExecDDLHistogram records the exexution time of a DDL.
Expand Down
2 changes: 1 addition & 1 deletion cdc/sinkv2/metrics/mq/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var (
Subsystem: "sinkv2",
Name: "mq_worker_send_message_duration",
Help: "Send Message duration(s) for MQ worker.",
Buckets: prometheus.ExponentialBuckets(0.001, 2, 20), // 1ms~1000s
Buckets: prometheus.ExponentialBuckets(0.001, 2, 20), // 1ms~524s
}, []string{"namespace", "changefeed"})
// WorkerBatchSize record the size of each batched messages.
WorkerBatchSize = prometheus.NewHistogramVec(
Expand Down
8 changes: 4 additions & 4 deletions cdc/sinkv2/metrics/txn/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (
Subsystem: "sinkv2",
Name: "txn_conflict_detect_duration",
Help: "Bucketed histogram of conflict detect time (s) for single DML statement.",
Buckets: prometheus.ExponentialBuckets(0.001, 2, 20), // 1ms~1000s
Buckets: prometheus.ExponentialBuckets(0.001, 2, 20), // 1ms~524s
}, []string{"namespace", "changefeed"})

WorkerFlushDuration = prometheus.NewHistogramVec(
Expand All @@ -33,7 +33,7 @@ var (
Subsystem: "sinkv2",
Name: "txn_worker_flush_duration",
Help: "Flush duration (s) for txn worker.",
Buckets: prometheus.ExponentialBuckets(0.001, 2, 20), // 1ms~1000s
Buckets: prometheus.ExponentialBuckets(0.001, 2, 20), // 1ms~524s
}, []string{"namespace", "changefeed"})

WorkerBusyRatio = prometheus.NewCounterVec(
Expand All @@ -58,7 +58,7 @@ var (
Subsystem: "sinkv2",
Name: "txn_sink_dml_batch_commit",
Help: "Duration of committing a DML batch",
Buckets: prometheus.ExponentialBuckets(0.01, 2, 18), // 10ms~1000s
Buckets: prometheus.ExponentialBuckets(0.01, 2, 18), // 10ms~1310s
}, []string{"namespace", "changefeed"})

SinkDMLBatchCallback = prometheus.NewHistogramVec(
Expand All @@ -67,7 +67,7 @@ var (
Subsystem: "sinkv2",
Name: "txn_sink_dml_batch_callback",
Help: "Duration of execuing a batch of callbacks",
Buckets: prometheus.ExponentialBuckets(0.01, 2, 18), // 10ms~1000s
Buckets: prometheus.ExponentialBuckets(0.01, 2, 18), // 10ms~1300s
}, []string{"namespace", "changefeed"})
)

Expand Down
2 changes: 1 addition & 1 deletion metrics/grafana/ticdc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7038,7 +7038,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"description": "Size of large rows (size >= 128K).",
"description": "Size of large rows (size >= 2K).",
"fieldConfig": {
"defaults": {},
"overrides": []
Expand Down