AWS XRay .NET: avoid tracing health checking requests

2

I am working with two application, one is .net core, the other is asp.net. I would like to configure both, to exclude my health check requests. I noticed that the Ruby version has a configuration for just this type of thing. https://github.com/cookpad/aws-xray

I spent quite a bit of time pouring over the .net version of the documentation, but was not able to find anything similar. I am under the assumption that I might be able to accomplish excluding out these requests, by setting up a sampling rule. However I was hoping there was some sort of configuration that would make this a bit easier.

已提問 4 年前檢視次數 1102 次
6 個答案
0

Thank you for the reply. I went ahead and set up the sampling rules and it worked great.

已回答 4 年前
  • Hi, Could you please provide the sampling rules you applied to avoid health checks.

0

Hi @clewallen,
Unfortunately, right now there is no other way (other than configuring sampling rules) to tell the AWS X-Ray .Net SDK to blacklist certain endpoint requests from tracing. We have this as a task in our backlog and would try to prioritize asap.

Also, the official AWS X-Ray Ruby SDK can be found https://github.com/aws/aws-xray-sdk-ruby . And looking at the API Reference docs mentioned in it, I don't see a way to exclude url paths from tracing there. Would be good to have this functionality for all the official SDKs.

Please let me know if there's anything else you need.

Thanks.

已回答 4 年前
0

So as it turns out the Sampling Rules that are in place on the Xray console are not being applied for one of my applications. The first application which is a public api is correctly applying all of the rules. However my second application (.net core) is not running any of the rules, even the Default rule put in place. I noticed on the documentation this quote.

"If the SDK can't reach X-Ray to get sampling rules, it reverts to a default local rule of the first request each second, and five percent of any additional requests per host. This can occur if the host doesn't have permission to call sampling APIs, or can't connect to the X-Ray daemon, which acts as a TCP proxy for API calls made by the SDK."

I was under the impression that the Default rule would be ran, I am not seeing this happen. Unless there is a rule being applied outside of my current sampling rules. Also if this is the case what kinds of permissions are needed?

Edited by: clewallen on Jan 7, 2020 10:56 AM

已回答 4 年前
0

So as it turns out the Sampling Rules that are in place on the Xray console are not being applied for one of my applications. The first application which is a public api is correctly applying all of the rules. However my second application (.net core) is not running any of the rules, even the Default rule put in place. I noticed on the documentation this quote.

"If the SDK can't reach X-Ray to get sampling rules, it reverts to a default local rule of the first request each second, and five percent of any additional requests per host. This can occur if the host doesn't have permission to call sampling APIs, or can't connect to the X-Ray daemon, which acts as a TCP proxy for API calls made by the SDK."

I was under the impression that the Default rule would be ran, I am not seeing this happen. Unless there is a rule being applied outside of my current sampling rules. Also if this is the case what kinds of permissions are needed?

已回答 4 年前
0

It was a matter of upgrading the IIS server to a use the latest AMI.

已回答 4 年前
0

Hi @clewallen
Its great that you were able to figure it out. Feel free to come back to the forum if you have any issues in the future.

Thanks!

已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南