Quoting @sqren:
If an error occurs during an unsampled transaction, transaction.id will still be added to the error. When querying for errors it is therefore not possible to easily find one that happened during a sampled transaction.
Possible solutions
Add transaction.sampled to errors
This will make it trivial to filter for errors that happened during a sampled transaction.