Loading doc/how-to/telemetry.md +9 −0 Original line number Diff line number Diff line Loading @@ -316,6 +316,15 @@ to do this. Set the value to `fatal` before starting your application to hide t The standard Python logging levels are all options: `critical`, `fatal`, `error`, `warning`, `info`, `debug`, `notset`. The name of the [opentelemetry-python](https://github.com/open-telemetry/opentelemetry-python) logger used for this may change in future, so there is a second environment variable, `PYTANGO_TELEMETRY_SDK_LOGGER_NAMES`, which can be set to a comma-seperated list of logger names. Defaults are used if the environment variable is empty or not set. (As at version 1.35.0, opentelemetry-python [does not support](https://github.com/open-telemetry/opentelemetry-python/issues/1059) its own `OTEL_LOG_LEVEL` environment variable). ## How to reduce the number of traces being stored Storing all traces from all Tango devices in your facility is probably not feasible. Loading pixi.lock +0 −0 File changed.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View original file View changed file tango/utils.py +10 −1 Original line number Diff line number Diff line Loading @@ -2344,7 +2344,16 @@ try: level_str = ApiUtil.get_env_var("PYTANGO_TELEMETRY_SDK_LOG_LEVEL") if level_str: level_int = logging.getLevelNamesMapping()[level_str.upper()] logging.getLogger("opentelemetry.sdk.trace.export").setLevel(level_int) names_csv = ApiUtil.get_env_var("PYTANGO_TELEMETRY_SDK_LOGGER_NAMES") if names_csv: names = names_csv.split(",") else: names = [ "opentelemetry.sdk.trace.export", "opentelemetry.sdk._shared_internal", ] for name in names: logging.getLogger(name).setLevel(level_int) _telemetry.set_log_level(level_str) _set_telemetry_sdk_log_level() Loading Loading
doc/how-to/telemetry.md +9 −0 Original line number Diff line number Diff line Loading @@ -316,6 +316,15 @@ to do this. Set the value to `fatal` before starting your application to hide t The standard Python logging levels are all options: `critical`, `fatal`, `error`, `warning`, `info`, `debug`, `notset`. The name of the [opentelemetry-python](https://github.com/open-telemetry/opentelemetry-python) logger used for this may change in future, so there is a second environment variable, `PYTANGO_TELEMETRY_SDK_LOGGER_NAMES`, which can be set to a comma-seperated list of logger names. Defaults are used if the environment variable is empty or not set. (As at version 1.35.0, opentelemetry-python [does not support](https://github.com/open-telemetry/opentelemetry-python/issues/1059) its own `OTEL_LOG_LEVEL` environment variable). ## How to reduce the number of traces being stored Storing all traces from all Tango devices in your facility is probably not feasible. Loading
pixi.lock +0 −0 File changed.Preview suppressed by a .gitattributes entry or the file's encoding is unsupported. View original file View changed file
tango/utils.py +10 −1 Original line number Diff line number Diff line Loading @@ -2344,7 +2344,16 @@ try: level_str = ApiUtil.get_env_var("PYTANGO_TELEMETRY_SDK_LOG_LEVEL") if level_str: level_int = logging.getLevelNamesMapping()[level_str.upper()] logging.getLogger("opentelemetry.sdk.trace.export").setLevel(level_int) names_csv = ApiUtil.get_env_var("PYTANGO_TELEMETRY_SDK_LOGGER_NAMES") if names_csv: names = names_csv.split(",") else: names = [ "opentelemetry.sdk.trace.export", "opentelemetry.sdk._shared_internal", ] for name in names: logging.getLogger(name).setLevel(level_int) _telemetry.set_log_level(level_str) _set_telemetry_sdk_log_level() Loading