chore: add loadtest observability setup
This commit is contained in:
@@ -23,7 +23,7 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("create_big_fish_session", move |connection, sender| {
|
||||
connection.procedures().create_big_fish_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -47,7 +47,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_big_fish_session", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_big_fish_session_then(procedure_input, move |_, result| {
|
||||
@@ -87,7 +87,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
procedure_input: BigFishWorksListInput,
|
||||
) -> Result<Vec<BigFishWorkSummaryRecord>, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_big_fish_works", move |connection, sender| {
|
||||
let fallback_owner_user_id = if procedure_input.published_only {
|
||||
None
|
||||
} else {
|
||||
@@ -120,7 +120,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("delete_big_fish_work", move |connection, sender| {
|
||||
let fallback_owner_user_id = Some(procedure_input.owner_user_id.clone());
|
||||
connection
|
||||
.procedures()
|
||||
@@ -152,7 +152,7 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("submit_big_fish_message", move |connection, sender| {
|
||||
connection.procedures().submit_big_fish_message_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -182,16 +182,22 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_big_fish_agent_message_turn_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_big_fish_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"finalize_big_fish_agent_message_turn",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_big_fish_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_big_fish_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -206,7 +212,7 @@ impl SpacetimeClient {
|
||||
compiled_at_micros: input.compiled_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("compile_big_fish_draft", move |connection, sender| {
|
||||
connection.procedures().compile_big_fish_draft_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -234,7 +240,7 @@ impl SpacetimeClient {
|
||||
generated_at_micros: input.generated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("generate_big_fish_asset", move |connection, sender| {
|
||||
connection.procedures().generate_big_fish_asset_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -260,7 +266,7 @@ impl SpacetimeClient {
|
||||
published_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("publish_big_fish_game", move |connection, sender| {
|
||||
connection.procedures().publish_big_fish_game_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -285,7 +291,7 @@ impl SpacetimeClient {
|
||||
played_at_micros: input.reported_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("record_big_fish_play", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_big_fish_play_then(procedure_input, move |_, result| {
|
||||
@@ -309,7 +315,7 @@ impl SpacetimeClient {
|
||||
started_at_micros: input.started_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("start_big_fish_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.start_big_fish_run_then(procedure_input, move |_, result| {
|
||||
@@ -332,7 +338,7 @@ impl SpacetimeClient {
|
||||
liked_at_micros: input.liked_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("record_big_fish_like", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_big_fish_like_then(procedure_input, move |_, result| {
|
||||
@@ -355,7 +361,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_big_fish_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_big_fish_run_then(procedure_input, move |_, result| {
|
||||
@@ -380,7 +386,7 @@ impl SpacetimeClient {
|
||||
remixed_at_micros: input.remixed_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("remix_big_fish_work", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.remix_big_fish_work_then(procedure_input, move |_, result| {
|
||||
@@ -405,7 +411,7 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("submit_big_fish_input", move |connection, sender| {
|
||||
connection.procedures().submit_big_fish_input_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
|
||||
Reference in New Issue
Block a user