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

Sort breadcrumbs before sending #3307

Merged
merged 9 commits into from
Jul 19, 2024
Merged

Conversation

antonpirker
Copy link
Member

Make sure our breadcrumbs are sorted by timestamp before sending to Sentry.

Fixes #3306

Copy link

codecov bot commented Jul 19, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 15978 tests with 8 failed, 13882 passed and 2088 skipped.

View the full list of failed tests

py3.10-common

  • Class name: tests.test_basics
    Test name: test_breadcrumb_ordering

    tests/test_basics.py:417: in test_breadcrumb_ordering
    timestamps_from_event = [
    tests/test_basics.py:418: in <listcomp>
    datetime.datetime.fromisoformat(x["timestamp"]).replace(tzinfo=None)
    E ValueError: Invalid isoformat string: '2024-07-19T10:44:09.341112Z'

py3.10-gevent

  • Class name: tests.test_basics
    Test name: test_breadcrumb_ordering

    tests/test_basics.py:417: in test_breadcrumb_ordering
    timestamps_from_event = [
    tests/test_basics.py:418: in <listcomp>
    datetime.datetime.fromisoformat(x["timestamp"]).replace(tzinfo=None)
    E ValueError: Invalid isoformat string: '2024-07-19T10:44:18.223727Z'

py3.6-common

  • Class name: tests.test_basics
    Test name: test_breadcrumb_ordering

    tests/test_basics.py:419: in test_breadcrumb_ordering
    for x in event["breadcrumbs"]["values"]
    tests/test_basics.py:419: in <listcomp>
    for x in event["breadcrumbs"]["values"]
    E AttributeError: type object 'datetime.datetime' has no attribute 'fromisoformat'

py3.6-gevent

  • Class name: tests.test_basics
    Test name: test_breadcrumb_ordering

    tests/test_basics.py:419: in test_breadcrumb_ordering
    for x in event["breadcrumbs"]["values"]
    tests/test_basics.py:419: in <listcomp>
    for x in event["breadcrumbs"]["values"]
    E AttributeError: type object 'datetime.datetime' has no attribute 'fromisoformat'

py3.7-common

  • Class name: tests.test_basics
    Test name: test_breadcrumb_ordering

    tests/test_basics.py:419: in test_breadcrumb_ordering
    for x in event["breadcrumbs"]["values"]
    tests/test_basics.py:419: in <listcomp>
    for x in event["breadcrumbs"]["values"]
    E ValueError: Invalid isoformat string: '2024-07-19T10:44:11.795020Z'

py3.8-common

  • Class name: tests.test_basics
    Test name: test_breadcrumb_ordering

    tests/test_basics.py:417: in test_breadcrumb_ordering
    timestamps_from_event = [
    tests/test_basics.py:418: in <listcomp>
    datetime.datetime.fromisoformat(x["timestamp"]).replace(tzinfo=None)
    E ValueError: Invalid isoformat string: '2024-07-19T10:44:18.923018Z'

py3.8-gevent

  • Class name: tests.test_basics
    Test name: test_breadcrumb_ordering

    tests/test_basics.py:417: in test_breadcrumb_ordering
    timestamps_from_event = [
    tests/test_basics.py:418: in <listcomp>
    datetime.datetime.fromisoformat(x["timestamp"]).replace(tzinfo=None)
    E ValueError: Invalid isoformat string: '2024-07-19T10:44:16.237426Z'

py3.9-common

  • Class name: tests.test_basics
    Test name: test_breadcrumb_ordering

    tests/test_basics.py:417: in test_breadcrumb_ordering
    timestamps_from_event = [
    tests/test_basics.py:418: in <listcomp>
    datetime.datetime.fromisoformat(x["timestamp"]).replace(tzinfo=None)
    E ValueError: Invalid isoformat string: '2024-07-19T10:44:11.785079Z'

Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change lgtm. Can we also have a test for this or is it a pita?

@antonpirker
Copy link
Member Author

I'll check

@antonpirker
Copy link
Member Author

Now with test @sentrivana

Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, ty!

@antonpirker antonpirker merged commit 8e3ddf9 into master Jul 19, 2024
125 checks passed
@antonpirker antonpirker deleted the antonpirker/fix-breadcrumbs branch July 19, 2024 11:27
arjennienhuis pushed a commit to arjennienhuis/sentry-python that referenced this pull request Sep 30, 2024
Make sure our breadcrumbs are sorted by timestamp before sending to Sentry.

Fixes getsentry#3306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Breadcrumb ordering
2 participants