rusackas commented on code in PR #32487:
URL: https://github.com/apache/superset/pull/32487#discussion_r3752218807


##########
docs/admin_docs/configuration/event-logging.mdx:
##########
@@ -50,13 +50,28 @@ Superset can be configured to log events to 
[StatsD](https://github.com/statsd/s
 if desired. Most endpoints hit are logged as
 well as key events like query start and end in SQL Lab.
 
-To setup StatsD logging, it’s a matter of configuring the logger in your 
`superset_config.py`.
-If not already present, you need to ensure that the `statsd`-package is 
installed in Superset's python environment.
+By default, Superset also collects gunicorn 
[metrics](https://docs.gunicorn.org/en/stable/instrumentation.html).
+To enable these, the following environment variables should be set:
+
+```bash
+SERVER_STATSD_HOST=localhost
+SERVER_STATSD_PORT=8125
+SERVER_STATSD_PREFIX=superset
+```
+
+To setup StatsD logging for Superset, it’s a matter of configuring the logger 
in your `superset_config.py`.
 
 ```python
+import os
 from superset.stats_logger import StatsdStatsLogger
-STATS_LOGGER = StatsdStatsLogger(host='localhost', port=8125, 
prefix='superset')
+STATS_LOGGER = StatsdStatsLogger(
+    host=os.environ.get("SERVER_STATSD_HOST", "localhost"),
+    port=int(os.environ.get("SERVER_STATSD_PORT", "8125")),

Review Comment:
   Already handled, the port parsing is wrapped in a try/except ValueError now 
and falls back to 8125.



##########
docs/admin_docs/configuration/event-logging.mdx:
##########
@@ -50,13 +50,28 @@ Superset can be configured to log events to 
[StatsD](https://github.com/statsd/s
 if desired. Most endpoints hit are logged as
 well as key events like query start and end in SQL Lab.
 
-To setup StatsD logging, it’s a matter of configuring the logger in your 
`superset_config.py`.
-If not already present, you need to ensure that the `statsd`-package is 
installed in Superset's python environment.
+By default, Superset also collects gunicorn 
[metrics](https://docs.gunicorn.org/en/stable/instrumentation.html).

Review Comment:
   Already fixed, the link points to gunicorn.org/instrumentation/ now.



##########
docs/admin_docs/configuration/event-logging.mdx:
##########
@@ -50,13 +50,34 @@ Superset can be configured to log events to 
[StatsD](https://github.com/statsd/s
 if desired. Most endpoints hit are logged as
 well as key events like query start and end in SQL Lab.
 
-To setup StatsD logging, it’s a matter of configuring the logger in your 
`superset_config.py`.
-If not already present, you need to ensure that the `statsd`-package is 
installed in Superset's python environment.
+By default, Superset also collects gunicorn 
[metrics](https://gunicorn.org/instrumentation/).
+To enable these, the following environment variables should be set:

Review Comment:
   Good catch, reworded to drop "by default" since the metrics are actually 
opt-in via those env vars. Pushed 48c2adc8.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to