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

Failed to capture traces if sentry-trace header exists #1099

Closed
6 of 13 tasks
ano1404 opened this issue Dec 8, 2020 · 2 comments · Fixed by #1100
Closed
6 of 13 tasks

Failed to capture traces if sentry-trace header exists #1099

ano1404 opened this issue Dec 8, 2020 · 2 comments · Fixed by #1100
Labels
Type: Bug Something isn't working

Comments

@ano1404
Copy link

ano1404 commented Dec 8, 2020

Platform:

  • Spring -> 2.2.1.RELEASE

IDE:

  • IntelliJ -> IntelliJ IDEA 2020.2.4 (Community Edition)
    Build #IC-202.8194.7, built on November 24, 2020

Build system:

  • Maven -> 3.6.3

Android Gradle Plugin:

  • Yes -> If yes, which version?
  • No

Sentry Android Gradle Plugin:

  • Yes -> If yes, which version?
  • No

Proguard/R8:

  • Enabled
  • Disabled

Platform installed with:

  • JCenter
  • Bintray
  • Maven Central
  • Manually

The version of the SDK:
4.0.0-alpha.1


I have the following issue:

So if the sentry-trace header is exists it will startTransaction in this line https://github.com/getsentry/sentry-java/blob/main/sentry-spring/src/main/java/io/sentry/spring/tracing/SentryTracingFilter.java#L88.
The transactionContext only set the parentSampled in https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/TransactionContext.java#L42, but does not set the sampled (set to null) https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/TransactionContext.java#L40

This will lead to always skipping the capture process in https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/Hub.java#L652-L658 because the transaction.isSampled() returns null

Expected result:

  • Result it should capture the traces even with sentry-trace header exists
@maciejwalkowiak
Copy link
Contributor

Thanks @ano1404 for reporting. Fix is on a way.

@bruno-garcia bruno-garcia added the Type: Bug Something isn't working label Dec 10, 2020
@bruno-garcia
Copy link
Member

@ano1404 thanks a lot for trying it out and raising the issue ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants