-
Notifications
You must be signed in to change notification settings - Fork 27
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
🐛 Fix aiohttp server autoinstrumentation #6391
🐛 Fix aiohttp server autoinstrumentation #6391
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6391 +/- ##
=========================================
+ Coverage 84.5% 87.8% +3.2%
=========================================
Files 10 1212 +1202
Lines 214 52746 +52532
Branches 25 950 +925
=========================================
+ Hits 181 46325 +46144
- Misses 23 6243 +6220
- Partials 10 178 +168
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please find out why this is happening. and without a hack.
Is this happening also in storage?
I dont think I am able to do that on my own :( |
Anyone feel free to pick this PR up I dont think I want to go down a rabbithole here on my own :--( |
For info @mrnicegyu11 I am going through a rabbit hole myself in autoscaling tests that started failing randomly after open telemetry PR went in and finding issues that were unrelated to it. Sometimes one needs to take time, and the time increases with complexity. |
Co-authored-by: Andrei Neagu <[email protected]>
…ISFoundation#6395) Co-authored-by: Dustin Kaiser <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there was a bad merge here. You might not want to touch those frontend files.
thanks for catching this, I fixed it please re-review ;) @odeimaiz |
@sanderegg @pcrespov I added a test as requested, thanks :--) Please re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good! thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
services/web/server/tests/unit/isolated/test_application_settings.py
Outdated
Show resolved
Hide resolved
services/web/server/tests/unit/isolated/test_application_settings.py
Outdated
Show resolved
Hide resolved
FYI: @mrnicegyu11 yet another deprecation warning within opentelemetry
|
Quality Gate passedIssues Measures |
What do these changes do?
Although after carefully reading all the manuals and docs I am quite sure that my last, big opentelemetry PR has correctly added the opentelemetry-autoinstrumentation-pip-packages for both the aiohttp-client (when an aiohttp server sends RESR requests) and the aiohttp-server (when the aiohttp server recieves REST requests) correctly, the
traces
in jaeger were incomplete. Those spans relating to the aiohttp-server in the webserver, so e.g. the first REST call from the qooxdoo to the webserver, were missing or disconnected.Some investigation with the debugger showed that the middleware of the aiohttp-server-autoinstrumentation's middleware was never successfully added to the aoihttp webserver (this: https://github.com/open-telemetry/opentelemetry-python-contrib/blob/08def3e40a72a03afb16f3a6b492663de5252469/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py#L194 ) . Now, that I add this manual step which the pip package should have done automatically, but dint, maybe simcore somewhere does low-level invasive stuff removing existing middlewares during initialization of the webserver?
This solves the issue, but it is not how the library is intended to be used....
Happy about comments
Update
I have investigated this in-depth and understood why this call is necessary and why it is likely even ok to do so in our case. Thanks for the help @GitHK much appreciated 🙏 ! Please read the comment I have added to the code, and see if this makes it clear / suffces. Thanks!
Related issue/s
How to test
Dev-ops checklist