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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인