From 5e8897e0787f792bb73b25c09f66f8be1b3597a0 Mon Sep 17 00:00:00 2001 From: PMierzwa Date: Fri, 18 Feb 2022 12:55:24 +0100 Subject: [PATCH] Be able to exclude basepath only in tracer --- opencensus/trace/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opencensus/trace/utils.py b/opencensus/trace/utils.py index 5b9be3473..fa8a0fd47 100644 --- a/opencensus/trace/utils.py +++ b/opencensus/trace/utils.py @@ -64,6 +64,8 @@ def disable_tracing_url(url, excludelist_paths=None): url_path = url.split('/', 1)[1] for path in excludelist_paths: + if path == "!basepathOnly" and url_path == "": + return True if url_path.startswith(path): return True