Change exclude lists to just exclude_urls, add tests for flask and django#872
Change exclude lists to just exclude_urls, add tests for flask and django#872lzchen merged 5 commits intoopen-telemetry:masterfrom
Conversation
| ************* | ||
| Excludes certain hosts and paths from being tracked. Pass in comma delimited string into environment variables. | ||
| Host refers to the entire url and path refers to the part of the url after the domain. Host matches the exact string that is given, where as path matches if the url starts with the given excluded path. | ||
| To exclude certain URLs from being tracked, set the environment variable ``OPENTELEMETRY_PYTHON_DJANGO_EXCLUDED_URLS`` with comma delimited regexes representing which URLs to exclude. |
There was a problem hiding this comment.
devil's advocate, but: what if the url I want to exclude has a comma?
There was a problem hiding this comment.
good question, hadn't thought of this. Not really sure of a good solution, I guess we could make the env variable an array or give some way to escape commas in the URL but they don't sound enticing. any ideas?
There was a problem hiding this comment.
Seems like a pretty specific case to me. I'm okay with the solution as is. Better to cover the majority of cases than to block something by fixating on a rare case.
There was a problem hiding this comment.
I think the only way to truly fix this is to make the env variable into an array. Any delimiter can be present in a url of the form
url.com/point?payload="delimiter"
f17b8df to
b146816
Compare
|
@AndrewAXue can you confirm whether or not your comments have been addressed, i can merge once they are resolved. |
|
@codeboten Ya we're good! |
resolves #779