Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make stresstest observability configurable #1375

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions crates/symbolicator-stress/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ pub fn init(config: Config) -> Guard {
}

if config.tracing {
// we will log DEBUG output
let rust_log = "INFO,symbolicator=DEBUG";
let rust_log = "INFO";
let subscriber = fmt()
.with_timer(UtcTime::rfc_3339())
.with_target(true)
Expand Down
26 changes: 19 additions & 7 deletions crates/symbolicator-stress/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,28 @@ static GLOBAL: Jemalloc = Jemalloc;
#[derive(Parser)]
struct Cli {
/// Path to your configuration file.
#[arg(long = "config", short = 'c', value_name = "FILE")]
#[arg(long, short, value_name = "FILE")]
config: Option<PathBuf>,

/// Path to the workload definition file.
#[arg(long = "workloads", short = 'w', value_name = "FILE")]
#[arg(long, short, value_name = "FILE")]
workloads: PathBuf,

/// Duration of the stresstest.
#[arg(long = "duration", short = 'd', value_parser = parse_duration)]
#[arg(long, short, value_parser = parse_duration)]
duration: Duration,

/// Register a `tracing` subscriber.
#[arg(long, short)]
tracing: bool,

/// Enable Sentry, capturing breadcrumbs and `tracing` spans if that is enabled as well.
#[arg(long, short)]
sentry: bool,

/// Register a metrics sink.
#[arg(long, short)]
metrics: bool,
}

fn main() -> Result<()> {
Expand All @@ -50,15 +62,15 @@ fn main() -> Result<()> {
let service_config = SymbolicatorConfig::get(config_path.as_deref())?;

let mut logging_guard = logging::init(logging::Config {
// TODO: actually make this configurable
backtraces: true,
tracing: true,
sentry: true,
metrics: true,
tracing: cli.tracing,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this change the default value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does, yes. but this is just a stresstest for running locally, it does not matter what is the default or not :-)

sentry: cli.sentry,
metrics: cli.metrics,
});

let megs = 1024 * 1024;
let runtime = tokio::runtime::Builder::new_multi_thread()
.thread_name("stresstest")
.enable_all()
.thread_stack_size(8 * megs)
.build()?;
Expand Down