ApplicationInsightsTimeoutError

John Brady 1 Reputation point
2021-09-30T21:17:45.233+00:00

Hi, trying to figure out why when setting up ai with the node sdk I am getting a timeout to port 80. My connection string has the endpoint starting https: This is causing the logging to not work because we are blocking port 80, have verified with our networking team. Is there any way to force appInsights to use port 443 from the Node SDK? This is when developing on localhost, have not configured localhost for https, not sure if that is the issue but other teams in my org are not having the issue with localhost on http, granted with different sdk's, react and js.

Here is my setup:

appInsights.setup(process.env.APPLICATIONINSIGHTS_CONNECTION_STRING ||
'InstrumentationKey=********-****-****-****-************;IngestionEndpoint=https://ingestionendpointurl/')
.setAutoDependencyCorrelation(true)
.setAutoCollectRequests(true)
.setAutoCollectPerformance(true, true)
.setAutoCollectExceptions(true)
.setAutoCollectDependencies(true)
.setAutoCollectConsole(true)
.setUseDiskRetryCaching(true)
.setSendLiveMetrics(false)
.setDistributedTracingMode(appInsights.DistributedTracingModes.AI).start();

Thanks so much!

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

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 15,856 Reputation points
    2021-10-18T16:56:51.797+00:00

    Hi @John Brady ,

    We took a closer look at the issue and It looks like you have an invalid connection string based on your code snippet.

    'InstrumentationKey=----;IngestionEndpoint=**https://ingestionendpointurl/')

    The easiest way to force appInsights to use port 443 is to specify the port explicitly in the url like so: IngestionEndpoint=https://ingestionendpointurl:443'

    Hope that helps. Please let us know if you have further questions.

    Thanks,
    Grace

    ----------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments