Home > database >  On AWS X-Ray, stop tracing a particular path on a Node API running in a docker container on ECS
On AWS X-Ray, stop tracing a particular path on a Node API running in a docker container on ECS

Time:06-22

I have a Node API running inside a docker container on ECS. I am using X-Ray to trace incoming requests.

I would like to instruct x-ray to not trace a particular API end-point on my Node API. Is this possible?

The API endpoint is:

/api/upload/directUploadConfirmation

I do not want that end-point traced via X-Ray.

What I have tried

I tried to create a sampling rule via the X-Ray console. I wanted to cheat and see for this paritular URL, capture 0 requests per second. But that plan failed because it doesn't accept 0, the number has to be greater than or equal to 1.

added image

CodePudding user response:

Just to confirm, are you using X-Ray console for creating a sampling rule

The AWS documentation lists several Sampling options that you can use including URL Path. This option is not available in APIGW, but should be available in ECS which you mentioned you are using. In my image I am using that to filter output requests to URL Path /foo/bar.

But that plan failed because it doesn't accept 0, the number has to be greater than or equal to 1.

Can you please confirm where you saw it fail to accept 0? Based on that I can try to replicate your setup and see if I get the same issue.

Thanks!

  • Related