dd-trace-go icon indicating copy to clipboard operation
dd-trace-go copied to clipboard

contrib/database/sql: Add WithErrorCheck option

Open soh335 opened this issue 2 years ago • 2 comments

Hi, it is same feature with https://github.com/DataDog/dd-trace-go/issues/805. Sometime, we need to ignore specific error from contrib/database/sql.

In our case, need to ignore insert error like that Error 1062: Duplicate entry 'xxx' for key 'PRIMARY'.

So need WithErrorCheck option. How about ?

soh335 avatar Jun 01 '22 03:06 soh335

Fine by me!

gbbr avatar Jun 02 '22 06:06 gbbr

@gbbr Thank you for quick response. Ready to review p-r https://github.com/DataDog/dd-trace-go/pull/1315 👍

soh335 avatar Jun 02 '22 06:06 soh335