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

Exclude Azure´s AlwaysOn calls #1102

Open
pmierzwa opened this issue Feb 18, 2022 · 1 comment · May be fixed by #1103
Open

Exclude Azure´s AlwaysOn calls #1102

pmierzwa opened this issue Feb 18, 2022 · 1 comment · May be fixed by #1103

Comments

@pmierzwa
Copy link

pmierzwa commented Feb 18, 2022

Is your feature request related to a problem?
Using Azure´s "Always On" feature pings "/" every 5 minutes. This fills up my applications insights with messages that has no use to me. It also shows up in the application map, which then gives me a false number for the amount of requests.

This path cannot be excluded in the OPENCENSUS EXCLUDELIST_PATHS, is it is using a string.startswith()

def disable_tracing_url(url, excludelist_paths=None):
"""Disable tracing on the provided excludelist paths, by default not tracing
the health check request.
If the url path starts with the excludelisted path, return True.
:type excludelist_paths: list
:param excludelist_paths: Paths that not tracing.
:rtype: bool
:returns: True if not tracing, False if tracing.
"""
if excludelist_paths is None:
excludelist_paths = DEFAULT_EXCLUDELIST_PATHS
# Remove the 'https?|ftp://' if exists
url = re.sub(URL_PATTERN, '', url)
# Split the url by the first '/' and get the path part
url_path = url.split('/', 1)[1]
for path in excludelist_paths:
if url_path.startswith(path):
return True
return False

Describe the solution you'd like.
I would like some sort of pattern to exclude the Azure AlwaysOn feature. Eg. ["!!AzureAlwaysOn"].

Describe alternatives you've considered.
I would be able to use [""] as a EXCLUDELIST_PATHS, but that would exclude everything.

Additional context.
Using Django.

The Azure AlwaysOn call example: http://localhost:8000/ eg. GET /

@pmierzwa pmierzwa linked a pull request Feb 18, 2022 that will close this issue
@lzchen lzchen added the azure Microsoft Azure label Jun 21, 2022
@LennardSchwarz
Copy link

Hi,
any progress on this?

At work we are using the FastAPI extension to log to Azure Insights and the Azure pings to “/“ are really cluttering our logs.

I would be very grateful for a solution or workaround on this.

@lzchen lzchen removed the azure Microsoft Azure label Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants