-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xray Sampling does not seem to be taking effect. #163
Comments
Hi @jamesoneill, Are you going to sample regular traces and filter out the health check ones? If so, you can follow the instructions here to customize the sampling rule. Note that only the one with the highest priority will be picked up and adopted by your services. |
Yes my aim is to filter out requests coming from our load balancer too the services behind them. As it completely makes the graph built unreadable and just interferes with useful sampling. Currently I have this configuration with a priority of 1 i tried to set it higher then the default priority but the UI does not allow this. Reservoir size Service name Am i creating this rule correctly assuming the endpoint i want to filter out are. example.com/ping . Kind regards, Jamie. |
Hi @jamesoneill , I believe if you want to filter out the unwanted traces, you may have to specify the ones you want to trace in the |
I've been having a very similar issue while deploying ECS services (flask and express) along with the x-ray daemon (which I think since it is not the inflection point, should have no impact here). Configuring the service like so:
does not exclude the traces. They still appear in the x-ray. Is there anything else missing here? I keep re-reading the docs and don't seem to figure out where the mistake is. |
@trobert2 this is more of a question for the Node.js SDK repo, but basically you are configuring local sampling rules by calling the However, if you'd like to stick with local sampling rules, you must explicitly disable centralized sampling by calling:
|
Hey @willarmiros, I had this issue for 2 separate APIs written in 2 different languages, that's why I mentioned flask alongside the express example. I have read the document you are referencing and it says:
Which to me sounds that I would be using both rule sets, unless I call that function, after which only the local ones will be used. As I have defined no central rules, the rules I have defined using So if I understood your answer correctly, I agree it is not an |
That is correct. There is a default centralized sampling rule that will be used for all requests even if you do not define any centralized sampling yourself if centralized sampling is not disabled. |
I have a request : example.com/api/conversation/health-check/ping. I have created a rule in AWS Console with the criteria :
Yet the traces are being generated. Anything I am doing wrong? |
Is Reservoir size and Fixed rate set to 0? |
I am seeing similar behaviour. I have a Sampling Rule
I would expect the above rule to decide I understand that rules don't always apply perfectly (in a eventually consistent system) however this is reproducible and doesn't appear as a centralized rule syncing issue. |
Hey @rishabh-shastri and @puddlewitt Do you know how many traces are being generated per second, as in, how many requests/second are being made to APIGW? |
@jj22ee Apologies that it has taken me so long to get back to you. To replicate this I have been executing a load test which runs 9 rqs constant. |
The TPS is fairly low that APIGW may not be applying the sampling rules 100% accurately. This is especially true in the case where you want 0 requests sampled in APIGW. You probably can get close to 0 requests sampled, but this unfortunately may not eliminate all sampling. In this scenario, you may want to disable tracing in that particular APIGW stage as a workaround. |
I ran another load test with increased traffic. 5 minutes @20rps I saw 0 recoded traces. So it works as you suggest. https://docs.aws.amazon.com/xray/latest/devguide/xray-console-sampling.html
|
Since this threat is still opened, I'll share my situation here which is very similar. I've created these sampling rules, but even with the Here I can see that health check traces are being captured. I wouldn't except this to happen. This is how I'm starting the app, which is running on App Runner: ADD https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar /opt/aws-opentelemetry-agent.jar
ENV JAVA_TOOL_OPTIONS=-javaagent:/opt/aws-opentelemetry-agent.jar
ENV OTEL_PROPAGATORS=xray
ENV OTEL_TRACES_SAMPLER=xray
ENV OTEL_METRICS_EXPORTER=none
ENV OTEL_SERVICE_NAME=MyApp
EXPOSE 8080
ENTRYPOINT ["java", "-jar","*.jar"] No errors in the logs:
|
Im very surprised this has not been sorted out yet, the problem is clear filtering out urls is not working. |
Ensure that the sampling is set to xray as such |
We are using Xray in ECS fargate, we currently see a lot of health check traces being sampled and as such would like to define sampling rules.
I have defined some rules and believe permissions are working correctly, but i do not see any trend data even for the default sampling rule.
I am using the xray deamon latest repo sampling with dotnet sdk.
Any help you can offer will be much appreciated .
The text was updated successfully, but these errors were encountered: