1

We're using AWS Api Gateway along with Lambda - using proxy integration. Lambda is hosting Asp.net core web api.

We also have configured Health Checks using Route53 enter image description here

We have turned on active tracing for APIGateway and Lambda. What we're trying to do, is to exclude health checks requests from x-ray tracing (do not sample them).

We're created a sampling rule: enter image description here And from the picture above - it looks like it's working, as it is matching the rule, but it's really not taking any effect. Almost all of the health checks are sampled (no difference from what we had without this rule).

This is how example trace looks like: enter image description here

So it's starting at API Gateway level, so I'm expecting API Gateway to make a sampling decision which will be propageted to the lambda. But it looks like it's not.

Do you have any idea what can be the reason, and do you know any other way to achive ignoring health checks ?

Black
  • 9,541
  • 3
  • 54
  • 54
JeloneK
  • 249
  • 2
  • 11

1 Answers1

2

Unfortunately sampling rules do not work when AWS Lambda is involved. See the quote below from the docs.

X-Ray applies a sampling algorithm to ensure that tracing is efficient, while still providing a representative sample of the requests that your application serves. The default sampling rule is 1 request per second and 5 percent of additional requests. This sampling rate cannot be configured for Lambda functions.