Skip to content

Commit

Permalink
Merge pull request #1 from pucciorenzo/sample-only
Browse files Browse the repository at this point in the history
Added configurable address and port
  • Loading branch information
miolad committed May 6, 2024
2 parents 68ee2d8 + 8e1af0d commit 1c0170a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions netto/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ struct Cli {
#[arg(short, long, default_value_t = 1000)]
frequency: u64,

/// Bind address or hostname for the web frontend
#[arg(short, long, default_value = "0.0.0.0")]
/// Address of the Grafana Pyroscope backend
#[arg(short, long, default_value = "pyroscope")]
address: String,

/// Bind port for the web frontend
#[arg(short, long, default_value_t = 8080)]
/// Port for the Grafana Pyroscope backend to listen on
#[arg(short, long, default_value_t = 4040)]
port: u16,

/// User-space controller update period in ms
Expand Down Expand Up @@ -123,7 +123,7 @@ fn main() -> anyhow::Result<()> {
channel::<anyhow::Error>(1);

let pyroscope_exporter_actor_addr = PyroscopeExporter::new(
"http://localhost:4040".to_string(), // TODO: make configurable
format!("http://{}:{}", cli.address, cli.port),
Duration::from_secs(5),
error_catcher_sender.clone(),
tokio::runtime::Handle::current(),
Expand Down

0 comments on commit 1c0170a

Please sign in to comment.