Skip to content

Commit

Permalink
Updated name of configuration option and improved documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-wilfert committed Sep 12, 2024
1 parent f2592a1 commit aa9c204
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
7 changes: 3 additions & 4 deletions crates/symbolicator-service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,8 @@ pub struct Config {
#[serde(default)]
pub _crash_db: Option<PathBuf>,

// TODO: 1) Discuss the name for this, currently the name in the sdk, not sure if that is what we want
// TODO: 2) Add documentation to this explaining nicely what ir does.
pub sample_rate: f32,
/// The sample rate for transactions. (0.0 - 1.0, defaults to 0.05)
pub transaction_sample_rate: f32,
}

impl Config {
Expand Down Expand Up @@ -560,7 +559,7 @@ impl Default for Config {
max_concurrent_requests: Some(200),
shared_cache: None,
_crash_db: None,
sample_rate: 0.05,
transaction_sample_rate: 0.05,
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions crates/symbolicator/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ pub fn execute() -> Result<()> {
if Some(true) == ctx.sampled() {
1.0
} else if ctx.operation() != "http.server" {
// TODO: Think about what to do with this comment now:
// Symbolicator receives at peak:
// - ~3_000 `symbolicate_js`,
// - ~800 `symbolicater`, and
Expand All @@ -101,9 +102,7 @@ pub fn execute() -> Result<()> {
// We only do this for the "real" transactions and not the http frontend that
// just spawns these computations.

// TODO: Think about if moving the the above comment to the Config is now more
// appropriate?
config.sample_rate
config.transaction_sample_rate
} else {
0.0
}
Expand Down
5 changes: 2 additions & 3 deletions local.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ cache_dir: cache
logging:
level: error

# TODO: Add some documentation for this here.
# The sample rate for event submission. (0.0 - 1.0, defaults to 0.05)
sample_rate: 0.05
# The sample rate for transactions. (0.0 - 1.0, defaults to 0.05)
transaction_sample_rate: 0.05

# Configure some default symbol sources:
sources:
Expand Down

0 comments on commit aa9c204

Please sign in to comment.