Merge nucleic/brisk-slate-viper-tkai into dev
This commit is contained in:
@@ -105,6 +105,12 @@ struct Batch<'a> {
|
||||
batch_type: &'static str,
|
||||
source: &'static str,
|
||||
session_id: Option<&'a str>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
environment_kind: Option<&'a str>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
environment_id: Option<&'a str>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
environment_label: Option<&'a str>,
|
||||
shell_id: &'a str,
|
||||
parent_shell: Option<&'a str>,
|
||||
events: &'a [Event],
|
||||
@@ -119,6 +125,9 @@ struct Config {
|
||||
hook_url: Option<HookUrl>,
|
||||
token: Option<String>,
|
||||
session_id: Option<String>,
|
||||
environment_kind: Option<String>,
|
||||
environment_id: Option<String>,
|
||||
environment_label: Option<String>,
|
||||
spool: Option<PathBuf>,
|
||||
}
|
||||
|
||||
@@ -159,6 +168,9 @@ impl Config {
|
||||
hook_url,
|
||||
token: std::env::var("NUCLEIC_HOOK_TOKEN").ok(),
|
||||
session_id: std::env::var("NUCLEIC_SESSION_ID").ok(),
|
||||
environment_kind: std::env::var("NUCLEIC_SHELL_ENVIRONMENT_KIND").ok(),
|
||||
environment_id: std::env::var("NUCLEIC_SHELL_ENVIRONMENT_ID").ok(),
|
||||
environment_label: std::env::var("NUCLEIC_SHELL_ENVIRONMENT_LABEL").ok(),
|
||||
spool,
|
||||
})
|
||||
}
|
||||
@@ -609,6 +621,9 @@ fn flusher(cfg: Config, shell_id: String, parent_shell: Option<String>, rx: mpsc
|
||||
batch_type: "shell-batch",
|
||||
source: "nash",
|
||||
session_id: cfg.session_id.as_deref(),
|
||||
environment_kind: cfg.environment_kind.as_deref(),
|
||||
environment_id: cfg.environment_id.as_deref(),
|
||||
environment_label: cfg.environment_label.as_deref(),
|
||||
shell_id: &shell_id,
|
||||
parent_shell: parent_shell.as_deref(),
|
||||
events: buf,
|
||||
|
||||
Reference in New Issue
Block a user