-
Notifications
You must be signed in to change notification settings - Fork 530
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
[INLONG-11129][Sort] Enhanced source metric instrumentation for InLong Sort Flink Connector #11130
Conversation
plz provide some test result shortcut in the comment~, thx~ |
Thanks for your question :) The first image shows the newly-added metrics in Flink Web Dashboard. The second image shows all the metrics reported by Slf4jReporter and the newly-added metrics have been highlighted with red rectangles. The following log is the metrics copied from the log of the docker container of Flink taskmanager, just for your reference. Click To View Complete Log
|
Briefly explaining the fixes made to the instantiation of SourceExactlyMetric: When only the MetricOptions parameter is passed to the SourceExactlyMetric constructor, self-defined metrics are not registered with the metricGroup. Therefore, to ensure proper registration of self-defined metrics, it is necessary to retrieve the metricGroup from the runtimeContext within the sourceFunction and pass it as the second parameter to the SourceExactlyMetric constructor. |
bugs fixed |
@PeterZh6 please fix the failed workflow, thanks. |
Thanks for following up with this. However, I am unable to reproduce the test failure locally, so may still need some time. |
The failure is linked to [Bug][Sort] Mongodb2StarRocksTest Failure Due to Potential Dependency Conflicts #11166 |
eafc3a2
to
e13b725
Compare
...tgres-cdc/src/main/java/org/apache/inlong/sort/postgre/RowDataDebeziumDeserializeSchema.java
Outdated
Show resolved
Hide resolved
...ectors/postgres-cdc/src/main/java/org/apache/inlong/sort/postgre/DebeziumSourceFunction.java
Outdated
Show resolved
Hide resolved
...ectors/postgres-cdc/src/main/java/org/apache/inlong/sort/postgre/DebeziumSourceFunction.java
Outdated
Show resolved
Hide resolved
ab4420f
inlong-sort/sort-flink/base/src/main/java/org/apache/inlong/sort/base/Constants.java
Outdated
Show resolved
Hide resolved
…g Sort Flink Connector (apache#11130)
Fixes #11129
Motivation
The primary goal of this PR is to enhance metric instrumentation for the InLong Sort Flink Connector, specifically for the Postgres-CDC connector. This change is aimed at improving observability by introducing additional metrics that track serialization/deserialization, snapshot states, and checkpoint completion.
Modifications
This feature focuses on SourceMetric only
Deserialization Metrics:
Added counters to track successful and failed deserialization attempts (
numDeserializeSuccess
,numDeserializeError
).Added latency gauge to measure time taken for deserialization (
deserializeTimeLag
).SnapshotState Metrics:
Added counters for the number of snapshots created (
numSnapshotCreate
) and errors encountered during snapshot operations (numSnapshotError
).NotifyComplete Metrics:
Added a counter to track completed snapshots (
numCompletedSnapshots
).Added latency gauge for the time between snapshot creation and checkpoint completion (
snapshotToCheckpointTimeLag
).Verifying this change
(Please pick either of the following options)
This change is a trivial rework/code cleanup without any test coverage.
This change is already covered by existing tests, such as:
(please describe tests)
This change added tests and can be verified as follows:
Make Flink
takemanager
report the metrics, with Slf4jReporter for example.Add the following configurations to
conf/flink-conf.yaml
of flinktaskmanager
and the above mentioned metrics will be printed to the logging file onceinlong-sort
starts to process data.Documentation