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

Improve extensions performance & add OpenTelemetry #1091

Merged
merged 15 commits into from
Jun 6, 2023

Conversation

rafalp
Copy link
Collaborator

@rafalp rafalp commented Jun 2, 2023

This PR removes separate ExtensionSync and synchronous extensions, making extensions work in both async and sync context based on next_ being coroutine function or not.

Fixes #649

TODO

  • OpenTracing
  • OpenTelemetry
  • ApolloTracing (needs test for async and sync context)
  • Update benchmarks

@rafalp rafalp added this to the Next release milestone Jun 2, 2023
@rafalp rafalp self-assigned this Jun 2, 2023
@rafalp rafalp changed the title Extension performacne & OpenTelemetry Improve extension performance & add OpenTelemetry Jun 2, 2023
@rafalp rafalp changed the title Improve extension performance & add OpenTelemetry Improve extensions performance & add OpenTelemetry Jun 2, 2023
@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #1091 (3b5d226) into master (7e2c2b9) will decrease coverage by 0.44%.
The diff coverage is 92.36%.

@@            Coverage Diff             @@
##           master    #1091      +/-   ##
==========================================
- Coverage   98.24%   97.81%   -0.44%     
==========================================
  Files         115      115              
  Lines        7511     7770     +259     
==========================================
+ Hits         7379     7600     +221     
- Misses        132      170      +38     
Impacted Files Coverage Δ
ariadne/contrib/tracing/copy_args.py 0.00% <0.00%> (ø)
tests/conftest.py 94.21% <90.90%> (-1.89%) ⬇️
ariadne/contrib/tracing/utils.py 96.29% <93.10%> (-3.71%) ⬇️
ariadne/contrib/tracing/opentelemetry.py 96.20% <96.20%> (ø)
ariadne/contrib/tracing/opentracing.py 98.61% <97.91%> (+2.82%) ⬆️
ariadne/contrib/tracing/apollotracing.py 91.66% <100.00%> (+2.95%) ⬆️
ariadne/types.py 94.20% <100.00%> (+0.69%) ⬆️
tests/asgi/test_configuration.py 100.00% <100.00%> (ø)
tests/asgi/test_query_execution.py 98.88% <100.00%> (ø)
tests/tracing/snapshots/snap_test_apollotracing.py 100.00% <100.00%> (ø)
... and 5 more

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rafalp
Copy link
Collaborator Author

rafalp commented Jun 5, 2023

Thanks for your feedback, @dacevedo12, I've did some tweaks.

@rafalp rafalp requested review from dacevedo12 and mat-sop and removed request for dacevedo12 June 5, 2023 17:01
@rafalp rafalp merged commit 785c487 into master Jun 6, 2023
@rafalp rafalp deleted the fix-649-add-open-telemetry branch June 6, 2023 14:21
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.

Replace OpenTracing extension with one for OpenTelemetry?
3 participants