-
Notifications
You must be signed in to change notification settings - Fork 652
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
Avoid generator in _ViewInstrumentMatch.collect() #3035
Avoid generator in _ViewInstrumentMatch.collect() #3035
Conversation
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.
Thanks for the PR! This will definitely use more memory but I think that's unavoidable
This could be a bug fix, @lancetarn, please add a CHANGELOG entry. ✌️ |
CHANGELOG updated! Thanks @ocelotl You (or someone) might need to kick off CI again for it. |
0a930e8
to
10db92b
Compare
It looks like one of the tornado contrib tests assumes I've reproduced this by checkout out the contrib repo and pointing CORE_REPO at my forked version; if there is a better way I'm interested but that seems ok. |
Okay I have set open-telemetry/opentelemetry-python-contrib#1456 up to solve the problem. Hopefully that was a reasonable thing to do. |
You will also have to update the Contrib SHA here with last commit hash that fixed the issue on contrib repo https://github.com/open-telemetry/opentelemetry-python/blob/main/.github/workflows/test.yml#L13 |
Would this later just have to be reverted? I was intending to just let the fix land over there first, then re-run these. |
@lancetarn |
10db92b
to
1e49add
Compare
- Fix open-telemetry#3021 - Remove metric branch reference from CONTRIBUTING.md
1e49add
to
2be1687
Compare
@lzchen Now I see, thank you. I'll point it back at |
@lancetarn |
…/github.com/shalevr/opentelemetry-python into decode-values-from-otel-resource-attributes * 'decode-values-from-otel-resource-attributes' of https://github.com/shalevr/opentelemetry-python: Avoid generator in _ViewInstrumentMatch.collect() (open-telemetry#3035)
Description
Alter
_ViewInstrumentMatch.collect()
to return a realizedList
ofdata_points
rather than aGenerator
. This probably has some memory implications, but I don't have a good handle on how impactful they are likely to be.Also updates CONTRIBUTING.md to remove mention of
metrics
branch.Fixes #3021
Type of change
This does change a return type, but it appears effectively internal and nothing within the SDK seemed to attempt to use the result in an incompatible way. The tests were actually assuming it was an
Iterator
rather than just anIterable
, I believe, so updating them felt like a fix.How Has This Been Tested?
Installed in editable mode with 3.9 and an external script to send signals to the console and a remote collector. Not a load test, but everything was collected and sent as expected.
Does This PR Require a Contrib Repo Change?
I did remove reference to the
metrics
branch in CONTRIBUTING.md, but that does not seem relevant.Checklist: