summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--osprofiler/cmd/commands.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/osprofiler/cmd/commands.py b/osprofiler/cmd/commands.py
index 2b6258f..99be83e 100644
--- a/osprofiler/cmd/commands.py
+++ b/osprofiler/cmd/commands.py
@@ -30,8 +30,11 @@ class TraceCommands(BaseCommand):
@cliutils.arg("trace", help="File with trace or trace id")
@cliutils.arg("--connection-string", dest="conn_str",
- default="ceilometer://",
- help="storage driver's connection string")
+ default=(cliutils.env("OSPROFILER_CONNECTION_STRING") or
+ "ceilometer://"),
+ help="Storage driver's connection string. Defaults to "
+ "env[OSPROFILER_CONNECTION_STRING] if set, else "
+ "ceilometer://")
@cliutils.arg("--json", dest="use_json", action="store_true",
help="show trace in JSON")
@cliutils.arg("--html", dest="use_html", action="store_true",