elastic / apm-agent-php

Apache License 2.0
256 stars 69 forks source link

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

Open kisprof opened 3 months ago

kisprof commented 3 months 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 3 months 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 3 months 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 2 months ago

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