Skip to content

Commit

Permalink
Remove json render metrics from the environment
Browse files Browse the repository at this point in the history
This json can break some tools that try to pass or evaluate the
environment and the original use case has been superceded by sentry
reporting.

Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
  • Loading branch information
rydrman committed Jul 5, 2023
1 parent 55a9b7c commit ccdf17c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/spfs-cli/cmd-enter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ sentry = ["spfs-cli-common/sentry"]
anyhow = { workspace = true }
clap = { workspace = true }
nix = { workspace = true }
serde_json = { workspace = true }
spfs = { path = "../../spfs" }
spfs-cli-common = { path = "../common" }
tokio = { version = "1.20", features = ["rt", "rt-multi-thread"] }
Expand Down
11 changes: 2 additions & 9 deletions crates/spfs-cli/cmd-enter/src/cmd_enter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use anyhow::{Context, Result};
use clap::{Args, Parser};
#[cfg(feature = "sentry")]
use cli::configure_sentry;
use serde_json::json;
use spfs::monitor::SPFS_MONITOR_FOREGROUND_LOGGING_VAR;
use spfs::storage::fs::RenderSummary;
use spfs_cli_common as cli;
Expand Down Expand Up @@ -245,15 +244,9 @@ impl CmdEnter {
.context("Failed to execute runtime command")
}

fn report_render_summary(&self, render_summary: RenderSummary, render_time: f64) {
#[cfg_attr(not(feature = "sentry"), allow(unused))]
fn report_render_summary(&self, _render_summary: RenderSummary, render_time: f64) {
if self.enter.metrics_in_env {
// The render summary data is put into a json blob in a
// environment variable for other, non-spfs, programs to
// access.
std::env::set_var(
"SPFS_METRICS_RENDER_REPORT",
format!("{}", json!(render_summary)),
);
// The render time is put into environment variables for
// other, non-spfs, programs to access. If this command
// has been run from spfs-run, then the sync time will
Expand Down

0 comments on commit ccdf17c

Please sign in to comment.