Getting transient client side error

Kunal K 0 Reputation points
2024-01-11T16:36:39.51+00:00

Hi, I am using open census library to save my exception logs of python code in azure app insights but im getting this error. Retrying due to transient client side error HTTPSConnectionPool(host='southeastasia-0.in.applicationinsights.azure.com', port=443): Max retries exceeded with url: //v2.1/track (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000002ADDB1B6760>: Failed to resolve 'southeastasia-0.in.applicationinsights.azure.com' ([Errno 11001] getaddrinfo failed)")). and below is my code:

import logging
from opencensus.ext.azure.log_exporter import AzureLogHandler

logger = logging.getLogger(__name__)
logger.addHandler(AzureLogHandler(connection_string='InstrumentationKey=''))

def sum(a: int, b: int) -> int:
    return a + b

a = 2
b = "a"

try:
    sum(a,b)
except Exception:
    logger.exception(Exception)

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Monalla-MSFT 13,071 Reputation points Moderator
    2024-01-11T18:16:08.2666667+00:00

    @Jupyter123 - Welcome to Microsoft Q&A and thanks for reaching out to us.

    It looks like the hostname for your Azure Application Insights instance could not be resolved. This could be due to a temporary issue with the DNS server or a problem with your network connection.

    Please try the below to see if the issue persists:

    1. Check the DNS server: Try pinging the hostname of your Azure Application Insights instance to see if it resolves to an IP address. If it doesn't, there may be an issue with the DNS server.
    2. Retry the request: The error message you're seeing indicates that the request is being retried due to a transient error. You can wait for a few minutes and then retry the request to see if the issue has been resolved.

    Hope this helps. and please feel free to reach out if you have any further questions.


    If the above response was helpful, please feel free to "Accept as Answer" and click "Yes" so it can be beneficial to the community.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.