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
AIOBotocore instrumentation #1135
Conversation
🦙 MegaLinter status: ❌ ERROR
See detailed report in MegaLinter reports |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1135 +/- ##
==========================================
- Coverage 81.71% 81.67% -0.04%
==========================================
Files 192 193 +1
Lines 21345 21368 +23
Branches 3715 3716 +1
==========================================
+ Hits 17441 17452 +11
- Misses 2819 2831 +12
Partials 1085 1085 ☔ View full report in Codecov by Sentry. |
# Because AIOBotocore's proxy functionality uses aiohttp | ||
# and urllib3 under the hood, New Relic has portions that | ||
# are classified as Web Transactions. This means that | ||
# browser monitoring will now be true. However, this will | ||
# inject unwanted JS Agent Header Fragments into SQS responses. | ||
trace.settings.browser_monitoring.enabled = False |
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.
I don't think this something you can do, the settings object is not a copy but just a reference to the application settings. You're permanently disabling browser monitoring everywhere in this application.
Browser monitoring shouldn't be at all relevant to an ExternalTrace anyway. The issue you're likely having is the mock server having issues with it being an aiohttp server. Why don't you try just disabling browser monitoring in conftest
?
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.
Also for the record, the correct way to disable browser monitoring for an individual transaction is newrelic.agent.disable_browser_autorum()
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.
I kind of went back and forth with this. I originally had it disabled in conftest but my rationale here was that, if a customer wanted to use the proxy functionality of aiobotocore SQS, the customer would have to disable the setting themselves just because of how the proxy server in aiobotocore works. If we are OK with this, I can put something in the docs about this as well.
This PR provides instrumentation support for AIOBotocore