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

fix(ci): fix executor metrics in release mode #3087

Merged
merged 1 commit into from
Jun 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
2 changes: 1 addition & 1 deletion src/stream/src/executor/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl DebugExecutor {
stream: impl MessageStream + 'static,
) -> impl MessageStream + 'static {
// Metrics
let stream = trace::metrics(extra.actor_id, extra.metrics, stream);
let stream = trace::metrics(extra.actor_id, extra.executor_id, extra.metrics, stream);

// Epoch check
let stream = epoch_check::epoch_check(info, stream);
Expand Down
11 changes: 8 additions & 3 deletions src/stream/src/executor/debug/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,22 @@ pub async fn trace(

/// Streams wrapped by `metrics` will update actor metrics.
#[try_stream(ok = Message, error = StreamExecutorError)]
pub async fn metrics(actor_id: ActorId, metrics: Arc<StreamingMetrics>, input: impl MessageStream) {
pub async fn metrics(
actor_id: ActorId,
executor_id: u64,
metrics: Arc<StreamingMetrics>,
input: impl MessageStream,
) {
let actor_id_string = actor_id.to_string();

let executor_id_string = executor_id.to_string();
pin_mut!(input);

while let Some(message) = input.next().await.transpose()? {
if let Message::Chunk(chunk) = &message {
if chunk.cardinality() > 0 {
metrics
.executor_row_count
.with_label_values(&[&actor_id_string])
.with_label_values(&[&actor_id_string, &executor_id_string])
.inc_by(chunk.cardinality() as u64);
}
}
Expand Down