prometheus / client_python

Prometheus instrumentation library for Python applications
Apache License 2.0
3.94k stars 795 forks source link

Optimization: Use str join to replace if #1029

Closed wangqingfree closed 4 months ago

wangqingfree commented 4 months ago

Use str join to replace if

full_name = "_".join(filter(None, [namespace, subsystem, name]))

image

wangqingfree commented 4 months ago

linked: https://github.com/prometheus/client_python/pull/1034/files