-
Notifications
You must be signed in to change notification settings - Fork 635
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: filter exemplar for observable instrument and export of exemplar without trace and span ids #4251
Fix: filter exemplar for observable instrument and export of exemplar without trace and span ids #4251
Conversation
de27bbc
to
48d786e
Compare
...to-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
Outdated
Show resolved
Hide resolved
...to-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
Outdated
Show resolved
Hide resolved
...to-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
Outdated
Show resolved
Hide resolved
Thanks @xrmx for the quick review - I don't know what to do about the remaining failure for the generate-workflows job. |
|
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.
Change LGTM but can you add an integration test case for this bug? Here's an existing test you could model it after https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/tests/metrics/integration_test/test_disable_default_views.py
14cbf8f
to
298cc1e
Compare
@fcollonval I think we are also missing tests for the OTEL_METRICS_EXEMPLAR_FILTER env var, when I set UPDATE: maybe the test requested by Aaron is enough |
I've started writing some integration tests but the always_off and trace_based are wrong because there should be an exemplar in the trace_based one: |
opentelemetry-sdk/tests/metrics/integration_test/test_exemplars.py
Outdated
Show resolved
Hide resolved
@aabmass Emidio fixed tests PTAL |
… without trace and span ids (#4251) * Deal with missing span and trace ids * Fix applying exemplar filter to observable instruments * Lint the code * add tests * Add entry in changelog * Fix span and trace id typing * Fix CI * Test consume_measurement is called for async instrument * Add integration tests * fix integration tests Signed-off-by: emdneto <[email protected]> * Update opentelemetry-sdk/tests/metrics/integration_test/test_exemplars.py * add test that default exemplar filter with no span does not create exemplar --------- Signed-off-by: emdneto <[email protected]> Co-authored-by: Frédéric Collonval <[email protected]> Co-authored-by: Riccardo Magliocchetti <[email protected]> Co-authored-by: Emídio Neto <[email protected]> Co-authored-by: Aaron Abbott <[email protected]>
Thanks a lot to all of you for helping fixing this and more generally for the maintenance of this great repo. |
Description
Fixes #4250
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
consume_measurement
is called with exemplar filter result for async instrumentDoes This PR Require a Contrib Repo Change?
Checklist:
Documentation has been updated