Enable passing explicit urls to exclude in instrumentation in FastAPI (#486)

This commit is contained in:
Cristian Vargas
2021-06-14 19:17:39 -05:00
committed by GitHub
parent c1fbe0e281
commit 7cae4d3001
5 changed files with 104 additions and 9 deletions

View File

@ -52,6 +52,13 @@ def get_excluded_urls(instrumentation):
_root.format("{}_EXCLUDED_URLS".format(instrumentation)), []
)
return parse_excluded_urls(excluded_urls)
def parse_excluded_urls(excluded_urls):
"""
Small helper to put an arbitrary url list inside of ExcludeList
"""
if excluded_urls:
excluded_urls = [
excluded_url.strip() for excluded_url in excluded_urls.split(",")