Skip to content

Sentry.getSpan() returns wrong transaction during activity's onCreate #4468

@zhukic

Description

@zhukic

Integration

sentry-android

Build System

Gradle

AGP Version

5.2.0

Proguard

Enabled

Version

8.13.2

Steps to Reproduce

Hi!

I want to enrich my activity transactions with some data taken from a bundle or start measuring some operations during activity onCreate method but when I call Sentry.getSpan() during activity's onCreate method, I don't get this activity's transaction because it gets created on onActivityCreated. So the data or spans are attached to the previous activity's transaction.

Expected Result

Calling Sentry.getSpan() during an activity's onCreate method returns this activity's transaction.

Actual Result

Calling Sentry.getSpan() during an activity's onCreate method returns previous activity's transaction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions