chore: add loadtest observability setup
This commit is contained in:
@@ -28,16 +28,19 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_visual_novel_agent_session_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"create_visual_novel_agent_session",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_visual_novel_agent_session_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -51,17 +54,20 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().get_visual_novel_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_visual_novel_agent_session",
|
||||
move |connection, sender| {
|
||||
connection.procedures().get_visual_novel_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -77,16 +83,19 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_visual_novel_agent_message_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"submit_visual_novel_agent_message",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_visual_novel_agent_message_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -107,19 +116,22 @@ impl SpacetimeClient {
|
||||
error_message: input.error_message,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_visual_novel_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"finalize_visual_novel_agent_message_turn",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_visual_novel_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -140,16 +152,19 @@ impl SpacetimeClient {
|
||||
compiled_at_micros: input.compiled_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.compile_visual_novel_work_profile_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"compile_visual_novel_work_profile",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.compile_visual_novel_work_profile_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -170,7 +185,7 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("update_visual_novel_work", move |connection, sender| {
|
||||
connection.procedures().update_visual_novel_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -196,7 +211,7 @@ impl SpacetimeClient {
|
||||
published_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("publish_visual_novel_work", move |connection, sender| {
|
||||
connection.procedures().publish_visual_novel_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -236,7 +251,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
procedure_input: VisualNovelWorksListInput,
|
||||
) -> Result<Vec<VisualNovelWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_visual_novel_works", move |connection, sender| {
|
||||
connection.procedures().list_visual_novel_works_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -260,7 +275,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_visual_novel_work_detail", move |connection, sender| {
|
||||
connection.procedures().get_visual_novel_work_detail_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -284,7 +299,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("delete_visual_novel_work", move |connection, sender| {
|
||||
connection.procedures().delete_visual_novel_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -311,7 +326,7 @@ impl SpacetimeClient {
|
||||
started_at_micros: input.started_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("start_visual_novel_run", move |connection, sender| {
|
||||
connection.procedures().start_visual_novel_run_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -335,7 +350,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_visual_novel_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_visual_novel_run_then(procedure_input, move |_, result| {
|
||||
@@ -367,16 +382,19 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_visual_novel_run_snapshot_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_run_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"upsert_visual_novel_run_snapshot",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_visual_novel_run_snapshot_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_run_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -397,19 +415,22 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.append_visual_novel_runtime_history_entry_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"append_visual_novel_runtime_history_entry",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.append_visual_novel_runtime_history_entry_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -423,16 +444,19 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.list_visual_novel_runtime_history_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"list_visual_novel_runtime_history",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.list_visual_novel_runtime_history_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -452,16 +476,19 @@ impl SpacetimeClient {
|
||||
occurred_at_micros: input.occurred_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_visual_novel_runtime_event_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_runtime_event_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"record_visual_novel_runtime_event",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_visual_novel_runtime_event_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_runtime_event_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user