humanmade / aws-xray

HM Platform AWS X-Ray Integration
23 stars 4 forks source link

Single segment payloads larger than 64KB throw warning #74

Closed Nikschavan closed 3 years ago

Nikschavan commented 4 years ago

From https://github.com/humanmade/aws-xray/issues/14#issuecomment-642500187 this is an expected case.

Although can we maybe attempt to avoid the warning, by not sending the segment if it is larger than the UDP packet size?

In our case, we have a few long database queries which keep filling up in the error logs. These segments are anyway not delivered to the demon so I am wondering we might skip from sending those by checking the length?

ivankristianto commented 3 years ago

@joehoyle This issue also happened in one of our project. If the single segment has more than 64KB it will throw errors and cause the block editor failed to received success message during save post. The culprit is because a plugin try to store css style into post meta. I have looked at the php-xray library, I think it won't solve the issue on a single segment as well. My plan is to truncate the sanitized_query field if it is more than 62KB (leave enough rooms for another fields). What do you think? The implication of this, it will caused truncated report in xray dashboard.

joehoyle commented 3 years ago

@ivankristianto I think it would be fine yes, even to truncate the query at like 5KB... I don't think there's any legitimate query that should be 64kb, and by 5kb of the query you should know enough about what query is doing it to go fix