Skip to content

Commit

Permalink
feat(metrics): expose sink error in grafana and factor error metrics (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxa21 authored Oct 31, 2023
1 parent 8a90ce5 commit b11c831
Show file tree
Hide file tree
Showing 16 changed files with 348 additions and 164 deletions.
2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions grafana/risingwave-dev-dashboard.dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,10 @@ def section_streaming_errors(outer_panels):
f"sum({metric('user_compute_error_count')}) by (error_type, error_msg, fragment_id, executor_name)",
"{{error_type}}: {{error_msg}} ({{executor_name}}: fragment_id={{fragment_id}})",
),
panels.target(
f"sum({metric('user_compute_error')}) by (error_type, error_msg, fragment_id, executor_name)",
"{{error_type}}: {{error_msg}} ({{executor_name}}: fragment_id={{fragment_id}})",
),
],
),
panels.timeseries_count(
Expand All @@ -1528,6 +1532,10 @@ def section_streaming_errors(outer_panels):
f"sum({metric('user_source_error_count')}) by (error_type, error_msg, fragment_id, table_id, executor_name)",
"{{error_type}}: {{error_msg}} ({{executor_name}}: table_id={{table_id}}, fragment_id={{fragment_id}})",
),
panels.target(
f"sum({metric('user_source_error')}) by (error_type, error_msg, fragment_id, table_id, executor_name)",
"{{error_type}}: {{error_msg}} ({{executor_name}}: table_id={{table_id}}, fragment_id={{fragment_id}})",
),
],
),
panels.timeseries_count(
Expand All @@ -1538,6 +1546,20 @@ def section_streaming_errors(outer_panels):
f"sum({metric('user_source_reader_error_count')}) by (error_type, error_msg, actor_id, source_id, executor_name)",
"{{error_type}}: {{error_msg}} ({{executor_name}}: actor_id={{actor_id}}, source_id={{source_id}})",
),
panels.target(
f"sum({metric('user_source_reader_error')}) by (error_type, error_msg, actor_id, source_id, executor_name)",
"{{error_type}}: {{error_msg}} ({{executor_name}}: actor_id={{actor_id}}, source_id={{source_id}})",
),
],
),
panels.timeseries_count(
"Sink by Connector",
"",
[
panels.target(
f"sum({metric('user_sink_error')}) by (connector_name, executor_id, error_msg)",
"{{connector_name}}: {{error_msg}} ({{executor_id}})",
),
],
),
],
Expand Down
2 changes: 1 addition & 1 deletion grafana/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

150 changes: 67 additions & 83 deletions java/com_risingwave_java_binding_Binding.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public void onNext(ConnectorServiceProto.SinkWriterStreamResponse response) {

@Override
public void onError(Throwable throwable) {
this.success =
Binding.sendSinkWriterErrorToChannel(this.responseTxPtr, throwable.getMessage());
LOG.error("JniSinkWriterHandler onError: ", throwable);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public class Binding {

public static native boolean sendSinkWriterResponseToChannel(long channelPtr, byte[] msg);

public static native boolean sendSinkWriterErrorToChannel(long channelPtr, String msg);

public static native byte[] recvSinkCoordinatorRequestFromChannel(long channelPtr);

public static native boolean sendSinkCoordinatorResponseToChannel(long channelPtr, byte[] msg);
Expand Down
2 changes: 2 additions & 0 deletions src/common/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ use tracing_subscriber::Layer;

use crate::monitor::GLOBAL_METRICS_REGISTRY;

mod error_metrics;
mod guarded_metrics;
mod relabeled_metric;

pub use error_metrics::*;
pub use guarded_metrics::*;
pub use relabeled_metric::*;

Expand Down
Loading

0 comments on commit b11c831

Please sign in to comment.