Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LighthouseIntegration does not report all the traces to Sentry #882

Closed
DenisKeyprod opened this issue Apr 11, 2024 · 4 comments · Fixed by #883
Closed

LighthouseIntegration does not report all the traces to Sentry #882

DenisKeyprod opened this issue Apr 11, 2024 · 4 comments · Fixed by #883
Assignees

Comments

@DenisKeyprod
Copy link

How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

4.2.0

Steps to reproduce

  1. Setup a simple Laravel/Lighthouse server with a random field (for ie "query.todos") and use "Laravel Sentry" library (https://docs.sentry.io/platforms/php/guides/laravel/) with a correct DSN and SENTRY_TRACES_SAMPLE_RATE=1.0
  2. Perform a query to you server, using a fragment defined at the beginning of your query. For instance
fragment todoFields on ToDo {
  id
  description
}

query todos{
  todos {
    ...todoFields
  }
}

Expected result

The query you made to your server should appear in your Sentry project under "Performances>Transactions>lighthouse?query{todos}"

Actual result

No such event appear in Sentry

@stayallive
Copy link
Collaborator

Do you get any event or just completely nothing? Is it possibly you are you over your quota for your organization possibly resulting in transaction not being reported, or do you get other transactions from the same application just fine?

Also to double check, did you clear or re-cache your config php artisan config:clear and/or php artisan config:cache if you use config caching?

Does php artisan sentry:test --transaction -vvv work and show no errors?

@DenisKeyprod
Copy link
Author

php artisan sentry:test --transaction -vvv does not return any error.

The culprit is "src/Sentry/Laravel/Tracing/Integrations/LighthouseIntegration.php" and its method "handleStartExecution".
At line 130, there is a test that check if the first operation definition is a OperationDefinitionNode but when the "fragment" is not one.

@stayallive
Copy link
Collaborator

That is interesting, but does make sense... thanks for the info!

@cleptric
Copy link
Member

We released 4.5.0 that includes a fix for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants