Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change exclude lists to just exclude_urls, add tests for flask and django #872

Merged
merged 5 commits into from
Jul 7, 2020

Conversation

cnnradams
Copy link
Member

resolves #779

Copy link
Contributor

@lzchen lzchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Copy link
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@@ -20,11 +20,15 @@ Configuration

Exclude lists
*************
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

devil's advocate, but: what if the url I want to exclude has a comma?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@AndrewAXue AndrewAXue Jul 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

@cnnradams cnnradams force-pushed the exclude_lists branch 2 times, most recently from f17b8df to b146816 Compare July 6, 2020 13:20
@codeboten
Copy link
Contributor

@AndrewAXue can you confirm whether or not your comments have been addressed, i can merge once they are resolved.

@AndrewAXue
Copy link
Contributor

@codeboten Ya we're good!

@lzchen lzchen merged commit d0e125a into open-telemetry:master Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

disable_tracing_hostname for URL exclude lists not covering reasonable use cases
6 participants