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

propagate okhttp status to parent spans #2872

Merged
merged 3 commits into from
Jul 31, 2023

Conversation

stefanosiano
Copy link
Member

@stefanosiano stefanosiano commented Jul 28, 2023

📜 Description

status of OkHttp calls now gets propagated to parent span
when OkHttp call finishes, status of unfinished spans is not overridden and is set to INTERNAL_ERROR

💡 Motivation and Context

OkHttp calls are grouped in a tree of parent-children. If a child span fails with status internal_error, the parent span has a different status, but it should be internal_error, too.
Fixes sentry-demos/android#60

💚 How did you test it?

Unit test

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

when OkHttp call finishes, status of unfinished spans is not overridden and is set to INTERNAL_ERROR
when OkHttp call finishes, status of unfinished spans is not overridden and is set to INTERNAL_ERROR
@stefanosiano stefanosiano marked this pull request as ready for review July 28, 2023 10:46
@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 303.02 ms 348.69 ms 45.67 ms
Size 1.72 MiB 2.29 MiB 575.54 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
8820c5c 330.60 ms 416.86 ms 86.26 ms
adf8fe3 300.49 ms 357.36 ms 56.87 ms
f274c79 313.96 ms 355.96 ms 42.00 ms
0310da5 381.20 ms 404.50 ms 23.30 ms
caf50ec 302.36 ms 325.25 ms 22.89 ms
496bdfd 272.86 ms 407.33 ms 134.48 ms
496bdfd 301.22 ms 343.96 ms 42.73 ms
2718fc8 322.33 ms 369.98 ms 47.65 ms
c03a05e 390.40 ms 419.35 ms 28.94 ms
87b3774 310.48 ms 362.04 ms 51.56 ms

App size

Revision Plain With Sentry Diff
8820c5c 1.72 MiB 2.28 MiB 571.82 KiB
adf8fe3 1.72 MiB 2.29 MiB 575.24 KiB
f274c79 1.72 MiB 2.29 MiB 575.01 KiB
0310da5 1.72 MiB 2.28 MiB 573.45 KiB
caf50ec 1.72 MiB 2.29 MiB 575.24 KiB
496bdfd 1.72 MiB 2.28 MiB 571.82 KiB
496bdfd 1.72 MiB 2.28 MiB 571.82 KiB
2718fc8 1.72 MiB 2.29 MiB 575.53 KiB
c03a05e 1.72 MiB 2.29 MiB 574.43 KiB
87b3774 1.72 MiB 2.29 MiB 575.54 KiB

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (87b3774) 81.38% compared to head (84c7b6f) 81.38%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2872   +/-   ##
=========================================
  Coverage     81.38%   81.38%           
  Complexity     4645     4645           
=========================================
  Files           354      354           
  Lines         17114    17114           
  Branches       2313     2313           
=========================================
  Hits          13928    13928           
  Misses         2236     2236           
  Partials        950      950           

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

Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

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

Nice, looks good to me!

@stefanosiano stefanosiano merged commit 3fc8b39 into main Jul 31, 2023
23 checks passed
@stefanosiano stefanosiano deleted the fix/okhttp-propagate-status-parent branch July 31, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants