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.

demandé il y a 4 ans1101 vues
6 réponses
0

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

répondu il y a 4 ans
  • 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.

répondu il y a 4 ans
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

répondu il y a 4 ans
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?

répondu il y a 4 ans
0

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

répondu il y a 4 ans
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!

répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions