elastic / apm-agent-php

Apache License 2.0
252 stars 69 forks source link

A single trigger_error() call gets reported multiple times with auto instrumentation #1205

Open kisprof opened 1 month ago

kisprof commented 1 month ago

Describe the bug A single trigger_error() call gets reported multiple times to the APM server if autoinstrumentation is enabled. To Reproduce Steps to reproduce the behavior: Following code snippet will report 13 number of user deprecated errors to the server.

Expected behavior Auto instrumented calls should not report earlier triggered errors. So in above scenario I would like to only see 1 error event.

intuibase commented 2 weeks ago

Hey @kisprof

Thank you for bug report. I tried to reproduce it but I failed - app quits on PDO constructor with uncaught exception. I got only one error:

Image

Image

Could you please review your app and settings and try again (or should I create DB)?

kisprof commented 2 weeks ago

Hi @intuibase

Yep a DB is needed for the test. Sorry my original ticket description is not that "plug and play".

Here is the same example with a full docker compose setup:

Image

intuibase commented 3 days ago

Thank you for reproduction - it works for me, I'll do my best to fix it.