Logging incoming request referrer in azure
up vote
0
down vote
favorite
I have deployed few .net APIs and applications as app service to Azure which is being used internally and also some of them can be called externally. Also have set up an Azure Alert for one of the major app services (let's call it Service A) which sends email notification in case of 404 error.
Looking into AppInsights, I can see some requests
that result in 404 error when calling one the services without any endpoint included in the url (service B https://serviceB.mydomain.com/
) and of course Service B returns 404 however AppInsights doesn't display the request caller (request referer). To investigate the 404 error I need to know about the caller url.
I'm aware that programmatically I can read request referer but how it can be done for 404 error which caused by a request to an endpoint which doesn't exist moreover some requests may not have referer. How can I log the caller url [preferably in Azure app services/appInsights]?
azure httprequest alert azure-application-insights http-referer
add a comment |
up vote
0
down vote
favorite
I have deployed few .net APIs and applications as app service to Azure which is being used internally and also some of them can be called externally. Also have set up an Azure Alert for one of the major app services (let's call it Service A) which sends email notification in case of 404 error.
Looking into AppInsights, I can see some requests
that result in 404 error when calling one the services without any endpoint included in the url (service B https://serviceB.mydomain.com/
) and of course Service B returns 404 however AppInsights doesn't display the request caller (request referer). To investigate the 404 error I need to know about the caller url.
I'm aware that programmatically I can read request referer but how it can be done for 404 error which caused by a request to an endpoint which doesn't exist moreover some requests may not have referer. How can I log the caller url [preferably in Azure app services/appInsights]?
azure httprequest alert azure-application-insights http-referer
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have deployed few .net APIs and applications as app service to Azure which is being used internally and also some of them can be called externally. Also have set up an Azure Alert for one of the major app services (let's call it Service A) which sends email notification in case of 404 error.
Looking into AppInsights, I can see some requests
that result in 404 error when calling one the services without any endpoint included in the url (service B https://serviceB.mydomain.com/
) and of course Service B returns 404 however AppInsights doesn't display the request caller (request referer). To investigate the 404 error I need to know about the caller url.
I'm aware that programmatically I can read request referer but how it can be done for 404 error which caused by a request to an endpoint which doesn't exist moreover some requests may not have referer. How can I log the caller url [preferably in Azure app services/appInsights]?
azure httprequest alert azure-application-insights http-referer
I have deployed few .net APIs and applications as app service to Azure which is being used internally and also some of them can be called externally. Also have set up an Azure Alert for one of the major app services (let's call it Service A) which sends email notification in case of 404 error.
Looking into AppInsights, I can see some requests
that result in 404 error when calling one the services without any endpoint included in the url (service B https://serviceB.mydomain.com/
) and of course Service B returns 404 however AppInsights doesn't display the request caller (request referer). To investigate the 404 error I need to know about the caller url.
I'm aware that programmatically I can read request referer but how it can be done for 404 error which caused by a request to an endpoint which doesn't exist moreover some requests may not have referer. How can I log the caller url [preferably in Azure app services/appInsights]?
azure httprequest alert azure-application-insights http-referer
azure httprequest alert azure-application-insights http-referer
edited Nov 16 at 3:39
asked Nov 16 at 3:33
Amir Chatrbahr
1,2861219
1,2861219
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
So far I was not able to find any facility in Azure portal to configure the AppInsights however it can be configured programmatically to track the referer and of course if the request doesn't have referer in the header for some reason, it can not be captured.
This link explains how AppInsight configuration can be done in codes to track the Referer.
UPDATE - And the root of issue:
Turned out "ALWAYS ON" feature in Azure Application Settings was ON for the Service B which means it sends request to the base url to keep it active and avoid recycling. For more info about Always On you can refer to here
add a comment |
up vote
0
down vote
One of the main reason for this would be that you might configure the availability test in App Insights
To be particularly this will be a URL ping test
This will hit the configured URL frequently at the location you configured
Thanks @Jayendran for the hint. I checked all the existing AppInsights but it wasn't the case. Also the request is not on a regular time intervals. More likely one of the internal/external services is pinging the url but can't track it.
– Amir Chatrbahr
Nov 18 at 22:32
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
So far I was not able to find any facility in Azure portal to configure the AppInsights however it can be configured programmatically to track the referer and of course if the request doesn't have referer in the header for some reason, it can not be captured.
This link explains how AppInsight configuration can be done in codes to track the Referer.
UPDATE - And the root of issue:
Turned out "ALWAYS ON" feature in Azure Application Settings was ON for the Service B which means it sends request to the base url to keep it active and avoid recycling. For more info about Always On you can refer to here
add a comment |
up vote
1
down vote
So far I was not able to find any facility in Azure portal to configure the AppInsights however it can be configured programmatically to track the referer and of course if the request doesn't have referer in the header for some reason, it can not be captured.
This link explains how AppInsight configuration can be done in codes to track the Referer.
UPDATE - And the root of issue:
Turned out "ALWAYS ON" feature in Azure Application Settings was ON for the Service B which means it sends request to the base url to keep it active and avoid recycling. For more info about Always On you can refer to here
add a comment |
up vote
1
down vote
up vote
1
down vote
So far I was not able to find any facility in Azure portal to configure the AppInsights however it can be configured programmatically to track the referer and of course if the request doesn't have referer in the header for some reason, it can not be captured.
This link explains how AppInsight configuration can be done in codes to track the Referer.
UPDATE - And the root of issue:
Turned out "ALWAYS ON" feature in Azure Application Settings was ON for the Service B which means it sends request to the base url to keep it active and avoid recycling. For more info about Always On you can refer to here
So far I was not able to find any facility in Azure portal to configure the AppInsights however it can be configured programmatically to track the referer and of course if the request doesn't have referer in the header for some reason, it can not be captured.
This link explains how AppInsight configuration can be done in codes to track the Referer.
UPDATE - And the root of issue:
Turned out "ALWAYS ON" feature in Azure Application Settings was ON for the Service B which means it sends request to the base url to keep it active and avoid recycling. For more info about Always On you can refer to here
edited Nov 22 at 1:22
answered Nov 20 at 0:56
Amir Chatrbahr
1,2861219
1,2861219
add a comment |
add a comment |
up vote
0
down vote
One of the main reason for this would be that you might configure the availability test in App Insights
To be particularly this will be a URL ping test
This will hit the configured URL frequently at the location you configured
Thanks @Jayendran for the hint. I checked all the existing AppInsights but it wasn't the case. Also the request is not on a regular time intervals. More likely one of the internal/external services is pinging the url but can't track it.
– Amir Chatrbahr
Nov 18 at 22:32
add a comment |
up vote
0
down vote
One of the main reason for this would be that you might configure the availability test in App Insights
To be particularly this will be a URL ping test
This will hit the configured URL frequently at the location you configured
Thanks @Jayendran for the hint. I checked all the existing AppInsights but it wasn't the case. Also the request is not on a regular time intervals. More likely one of the internal/external services is pinging the url but can't track it.
– Amir Chatrbahr
Nov 18 at 22:32
add a comment |
up vote
0
down vote
up vote
0
down vote
One of the main reason for this would be that you might configure the availability test in App Insights
To be particularly this will be a URL ping test
This will hit the configured URL frequently at the location you configured
One of the main reason for this would be that you might configure the availability test in App Insights
To be particularly this will be a URL ping test
This will hit the configured URL frequently at the location you configured
answered Nov 18 at 15:59
Jayendran
2,88331334
2,88331334
Thanks @Jayendran for the hint. I checked all the existing AppInsights but it wasn't the case. Also the request is not on a regular time intervals. More likely one of the internal/external services is pinging the url but can't track it.
– Amir Chatrbahr
Nov 18 at 22:32
add a comment |
Thanks @Jayendran for the hint. I checked all the existing AppInsights but it wasn't the case. Also the request is not on a regular time intervals. More likely one of the internal/external services is pinging the url but can't track it.
– Amir Chatrbahr
Nov 18 at 22:32
Thanks @Jayendran for the hint. I checked all the existing AppInsights but it wasn't the case. Also the request is not on a regular time intervals. More likely one of the internal/external services is pinging the url but can't track it.
– Amir Chatrbahr
Nov 18 at 22:32
Thanks @Jayendran for the hint. I checked all the existing AppInsights but it wasn't the case. Also the request is not on a regular time intervals. More likely one of the internal/external services is pinging the url but can't track it.
– Amir Chatrbahr
Nov 18 at 22:32
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53331031%2flogging-incoming-request-referrer-in-azure%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown