Skip to content
Closed
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
10 changes: 8 additions & 2 deletions crates/core/src/host/wasm_common/module_host_actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,11 @@ impl InstanceCommon {
WORKER_METRICS
.wasm_instance_errors
.with_label_values(
&self.info.database_identity,
&caller_identity,
&self.info.module_hash,
&caller_connection_id,
&false,
procedure_name,
)
.inc();
Expand Down Expand Up @@ -691,6 +693,7 @@ impl InstanceCommon {
&caller_identity,
&Some(caller_connection_id),
reducer_name,
trapped,
)
}
Err(ExecutionError::User(err)) => {
Expand Down Expand Up @@ -772,13 +775,16 @@ impl InstanceCommon {
caller_identity: &Identity,
caller_connection_id: &Option<ConnectionId>,
reducer_name: &str,
trapped: bool,
) -> EventStatus {
WORKER_METRICS
.wasm_instance_errors
.with_label_values(
&self.info.database_identity,
caller_identity,
&self.info.module_hash,
&caller_connection_id.unwrap_or(ConnectionId::ZERO),
&trapped,
reducer_name,
)
.inc();
Expand Down Expand Up @@ -903,13 +909,13 @@ impl InstanceCommon {
let outcome = match (result.call_result, sender) {
(Err(ExecutionError::Recoverable(err) | ExecutionError::Trap(err)), _) => {
inst.log_traceback("view", &view_name, &err);
self.handle_outer_error(&result.stats.energy, &caller, &None, &view_name)
self.handle_outer_error(&result.stats.energy, &caller, &None, &view_name, trapped)
.into()
}
// TODO: maybe do something else with user errors?
(Err(ExecutionError::User(err)), _) => {
inst.log_traceback("view", &view_name, &anyhow::anyhow!(err));
self.handle_outer_error(&result.stats.energy, &caller, &None, &view_name)
self.handle_outer_error(&result.stats.energy, &caller, &None, &view_name, trapped)
.into()
}
// Materialize anonymous view
Expand Down
5 changes: 3 additions & 2 deletions crates/core/src/worker_metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,9 @@ metrics_group!(
pub reducer_wait_time: HistogramVec,

#[name = spacetime_worker_wasm_instance_errors_total]
#[help = "The number of fatal WASM instance errors, such as reducer panics."]
#[labels(caller_identity: Identity, module_hash: Hash, caller_connection_id: ConnectionId, reducer_symbol: str)]
#[help = "The number of WASM instance errors, such as reducer panics."]
#[labels(database_identity: Identity, caller_identity: Identity, module_hash: Hash, caller_connection_id: ConnectionId, trapped:
bool, reducer_symbol: str)]
pub wasm_instance_errors: IntCounterVec,

#[name = spacetime_worker_wasm_memory_bytes]
Expand Down
Loading