Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Exclude Azure´s AlwaysOn calls #1102

Description

@pmierzwa

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 /

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions