Skip to content

Commit 122a52f

Browse files
committed
refactor(cli): add info log for application-name
1 parent e03a29f commit 122a52f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pyroscope_cli/src/core/commands.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ pub fn connect() -> Result<()> {
9696
//
9797
fn set_application_name() -> Result<()> {
9898
let pre_app_name: String = AppConfig::get::<String>("application_name").unwrap_or_else(|_| {
99+
log::info!("we recommend specifying application name via -application-name flag or env variable PYROSCOPE_APPLICATION_NAME");
99100
names::Generator::default()
100101
.next()
101102
.unwrap_or_else(|| "unassigned.app".to_string())
@@ -110,6 +111,12 @@ fn set_application_name() -> Result<()> {
110111
// add pre to pre_app_name
111112
let app_name = format!("{}.{}", pre, pre_app_name);
112113

114+
log::info!(
115+
"Profiling with {} profiler with application name: {}",
116+
pre,
117+
app_name
118+
);
119+
113120
AppConfig::set("application_name", app_name.as_str())?;
114121

115122
Ok(())

0 commit comments

Comments
 (0)