getsentry / sentry-docs

Sentry's documentation (and tools to build it)
https://docs.sentry.io
Other
326 stars 1.43k forks source link

Performance data is not sent in Sentry with vanilla PHP setup #8622

Open Pum-purum opened 9 months ago

Pum-purum commented 9 months ago

How do you use Sentry?

Self-hosted / on-premises

SDK version

3.22

Steps to reproduce

  1. Include Sentry profile script in top of the page:
\Sentry\init(['dsn'                  => $_SERVER['SENTRY_DSN'],
                  'environment'          => $_SERVER['SENTRY_ENV'],
                  'traces_sample_rate'   => 0.1
    ]);

Expected result

Data appears in Performance section

Actual result

Nothing.

Another method - set up with Symfony bundle - works fine.

stayallive commented 9 months ago

I totally understand your confusion when I read these docs: https://docs.sentry.io/platforms/php/performance/.

Unfortunately we don't have automatic transactions for the PHP SDK (without the Laravel/Symfony SDK) you have to do a little more work, the instructions doesn't seem to be on that page anymore... it should mention: https://docs.sentry.io/platforms/php/performance/instrumentation/custom-instrumentation/

Hope that helps getting started, let's keep this issue open to track us updating the docs for this though!

Pum-purum commented 9 months ago

Oh, really? Sorry that I misunderstood example from docs :( This is bad news. But I can not to insert such a constructions on each block of code.

getsantry[bot] commented 9 months ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 6 months ago

Routing to @getsentry/product-owners-sdks-web-backend for triage ⏲️