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

Gracefully handle spans without logs field #2191

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

MaXal
Copy link
Contributor

@MaXal MaXal commented Feb 29, 2024

Searching of spans throws "Cannot read properties of undefined (reading 'some')" exceptions and breaks UI

To reproduce:

  1. Open the attached file via Search|Upload: opentelemetry (8).json
  2. Type bootstrap in search

The following exception will be thrown and UI will crash completely:

chunk-JFYQRAKV.js?v=ef5bea20:9145 Uncaught TypeError: Cannot read properties of undefined (reading 'some')
    at isSpanAMatch (filter-spans.tsx:63:38)
    at Array.filter (<anonymous>)
    at TracePageImpl.filterSpans (filter-spans.tsx:68:41)
    at TracePageImpl.memoized [as _filterSpans] (chunk-X3V25DTT.js?v=ef5bea20:22:27)
    at TracePageImpl.render (index.tsx:358:32)
    at finishClassComponent (chunk-JFYQRAKV.js?v=ef5bea20:14694:39)
    at updateClassComponent (chunk-JFYQRAKV.js?v=ef5bea20:14659:32)
    at beginWork (chunk-JFYQRAKV.js?v=ef5bea20:15918:22)
    at beginWork$1 (chunk-JFYQRAKV.js?v=ef5bea20:19749:22)
    at performUnitOfWork (chunk-JFYQRAKV.js?v=ef5bea20:19194:20)

@MaXal MaXal requested a review from a team as a code owner February 29, 2024 14:12
@MaXal MaXal requested review from albertteoh and removed request for a team February 29, 2024 14:12
yurishkuro
yurishkuro previously approved these changes Feb 29, 2024
Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.59%. Comparing base (e7dd28d) to head (120c7e2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2191      +/-   ##
==========================================
+ Coverage   96.57%   96.59%   +0.01%     
==========================================
  Files         254      254              
  Lines        7629     7629              
  Branches     1925     1988      +63     
==========================================
+ Hits         7368     7369       +1     
+ Misses        261      260       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label Mar 1, 2024
@yurishkuro yurishkuro changed the title Searching of spans throws "Cannot read properties of undefined (reading 'some')" exceptions and breaks UI Gracefully handle spans without logs field Mar 1, 2024
@yurishkuro
Copy link
Member

[prettier-lint] *** PLEASE RUN yarn prettier AND RESUBMIT ***

also, DCO check is still failing (easiest is to squash commits and resubmit just one as signed)

@yurishkuro
Copy link
Member

btw the reason DCO is failing is because it looks like you have different emails in github account and your local git config

Otherwise, search fails with:
Uncaught TypeError: Cannot read properties of undefined (reading 'some')

Signed-off-by: Maxim.Kolmakov <maxim.kolmakov@gmail.com>
@MaXal
Copy link
Contributor Author

MaXal commented Mar 1, 2024

Sorry for the mess, and thank you for your patience; I fixed the email address in the repository to match the one in Github and the prettier warning in the test file.

@yurishkuro
Copy link
Member

tip for the future - do not create PRs from the main branch of your fork, always use a new branch

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Thanks!

@yurishkuro yurishkuro merged commit aba6c2c into jaegertracing:main Mar 1, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants