-
Notifications
You must be signed in to change notification settings - Fork 288
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: add data flow metrics #2763
Conversation
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
cdc/entry/mounter.go
Outdated
@@ -138,6 +139,7 @@ func (m *mounterImpl) codecWorker(ctx context.Context, index int) error { | |||
pEvent.RawKV.OldValue = nil | |||
pEvent.PrepareFinished() | |||
metricMountDuration.Observe(time.Since(startTime).Seconds()) | |||
metricTotalRows.Add(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about using Inc()
, and shall we delete this metrics when mounter close.
cdc/processor/pipeline/sink.go
Outdated
@@ -150,6 +151,7 @@ func (n *sinkNode) flushSink(ctx pipeline.NodeContext, resolvedTs model.Ts) (err | |||
|
|||
func (n *sinkNode) emitEvent(ctx pipeline.NodeContext, event *model.PolymorphicEvent) error { | |||
if event == nil || event.Row == nil { | |||
log.Warn("skip emit empty rows", zap.Reflect("event", event)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zap.Any
is preferred than zap.Reflect
@@ -43,16 +44,22 @@ type Manager struct { | |||
flushing int64 | |||
|
|||
drawbackChan chan drawbackMsg | |||
|
|||
metricsTableSinkTotalRows prometheus.Counter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we delete this when closing the sink manager?
@@ -237,6 +245,7 @@ func (b *bufferSink) run(ctx context.Context, errCh chan error) { | |||
metricFlushDuration := flushRowChangedDuration.WithLabelValues(advertiseAddr, changefeedID, "Flush") | |||
metricEmitRowDuration := flushRowChangedDuration.WithLabelValues(advertiseAddr, changefeedID, "EmitRow") | |||
metricBufferSize := bufferChanSizeGauge.WithLabelValues(advertiseAddr, changefeedID) | |||
metricTotalRows := bufferSinkTotalRowsCountCounter.WithLabelValues(advertiseAddr, changefeedID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
Signed-off-by: Neil Shen <[email protected]>
cdc/sink/metrics.go
Outdated
Namespace: "ticdc", | ||
Subsystem: "sink", | ||
Name: "table_sink_total_rows_count", | ||
Help: "total count of rows", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this help text be more detailed
cdc/sink/metrics.go
Outdated
Namespace: "ticdc", | ||
Subsystem: "sink", | ||
Name: "buffer_sink_total_rows_count", | ||
Help: "total count of rows", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
{ | ||
"alias": "/.*-rpc/", | ||
"yaxis": 2 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this useless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it make .*-rpc
aligned to y axis.
metrics/grafana/ticdc.json
Outdated
{ | ||
"alias": "/.*processor.*/", | ||
"yaxis": 2 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
CI failed |
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
…into metrics/dataflow
/merge |
This pull request has been accepted and is ready to merge. Commit hash: e5f7a60
|
/run-kafka-tests |
1 similar comment
/run-kafka-tests |
@overvenus: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/run-integration-tests |
1 similar comment
/run-integration-tests |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #2828. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #2829. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #2830. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #2831. |
What problem does this PR solve?
Add data flow metrics.
Also, this PR adds chechkpoint derivative and TiKV traffics
Related changes
Cc #1606
Release note