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

Attempt to fix test_urls_excluded_from_sampling #158

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Attempt to fix test_urls_excluded_from_sampling #158

merged 1 commit into from
Apr 12, 2024

Conversation

thpierce
Copy link
Contributor

@thpierce thpierce commented Apr 12, 2024

test_urls_excluded_from_sampling keeps failing on PR, causing annoying delays. I suspect that the problem is a race condition - we are exporting a span then grabbing it, and I believe that the delay between export and being "grabbable" is causing the test to fail (typically with 1 != 2). As an attempted fix, I'm adding some retry logic that will attempt to grab for a full second.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@thpierce thpierce requested a review from a team as a code owner April 12, 2024 20:05
@thpierce thpierce changed the title DO NOT MERGE Attempt to fix test_urls_excluded_from_sampling Apr 12, 2024
Copy link
Contributor

@jj22ee jj22ee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

In the future, we will move away from using ENV vars to ignore select URLs, use upstream suppress_instrumentation() method instead

https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/opentelemetry-instrumentation/src/opentelemetry/instrumentation/utils.py#L189-L192

@thpierce thpierce merged commit 5586e87 into main Apr 12, 2024
11 checks passed
@thpierce thpierce deleted the fix branch April 12, 2024 20:30
jj22ee added a commit to jj22ee/aws-otel-python-instrumentation that referenced this pull request Jun 4, 2024
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.

2 participants