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

Fix httplib #3820

Open
wants to merge 1 commit into
base: potel-base
Choose a base branch
from
Open

Fix httplib #3820

wants to merge 1 commit into from

Conversation

sl0thentr0py
Copy link
Member

No description provided.

)
description = f"{http_method} {url}"
# TODO-neel-potel remove description completely
description = span_attributes.get(
Copy link
Member Author

Choose a reason for hiding this comment

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

this logic is a mess, I will remove description completely later.
Also this function messes up order of precedence of op and name/desc if explicitly set.

# HTTPSConnection.send is passed a string containing (among other things)
# the headers on the request. Mock it so we can check the headers, and also
# so it doesn't try to actually talk to the internet.
mock_send = mock.Mock()
Copy link
Member Author

Choose a reason for hiding this comment

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

removed the mock in favor of the fixture above

sentry_init(
trace_propagation_targets=trace_propagation_targets,
traces_sample_rate=1.0,
)

headers = {
Copy link
Member Author

Choose a reason for hiding this comment

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

this was not necessary for this test at all

Copy link

codecov bot commented Nov 22, 2024

❌ 1003 Tests Failed:

Tests completed Failed Passed Skipped
19684 1003 18681 4424
View the top 2 failed tests by shortest run time
tests.integrations.opentelemetry.test_span_processor test_on_start_transaction
Stack Traces | 0.001s run time
.../integrations/opentelemetry/test_span_processor.py:289: in test_on_start_transaction
    fake_start_transaction,
.../hostedtoolcache/Python/3.7.17....../x64/lib/python3.7/unittest/mock.py:1307: in __enter__
    original, local = self.get_original()
.../hostedtoolcache/Python/3.7.17....../x64/lib/python3.7/unittest/mock.py:1281: in get_original
    "%s does not have the attribute %r" % (target, name)
E   AttributeError: <module 'sentry_sdk.integrations.opentelemetry.span_processor' from '.../integrations/opentelemetry/span_processor.py'> does not have the attribute 'start_transaction'
tests.integrations.opentelemetry.test_span_processor test_on_start_transaction
Stack Traces | 0.002s run time
.../integrations/opentelemetry/test_span_processor.py:287: in test_on_start_transaction
    with mock.patch(
.../hostedtoolcache/Python/3.12.7....../x64/lib/python3.12/unittest/mock.py:1463: in __enter__
    original, local = self.get_original()
.../hostedtoolcache/Python/3.12.7....../x64/lib/python3.12/unittest/mock.py:1436: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.opentelemetry.span_processor' from '.../integrations/opentelemetry/span_processor.py'> does not have the attribute 'start_transaction'
View the full list of 1 ❄️ flaky tests
tests.integrations.opentelemetry.test_span_processor test_on_start_transaction

Flake rate in main: 90.70% (Passed 4 times, Failed 39 times)

Stack Traces | 0.001s run time
.../integrations/opentelemetry/test_span_processor.py:289: in test_on_start_transaction
    fake_start_transaction,
.../hostedtoolcache/Python/3.7.17....../x64/lib/python3.7/unittest/mock.py:1307: in __enter__
    original, local = self.get_original()
.../hostedtoolcache/Python/3.7.17....../x64/lib/python3.7/unittest/mock.py:1281: in get_original
    "%s does not have the attribute %r" % (target, name)
E   AttributeError: <module 'sentry_sdk.integrations.opentelemetry.span_processor' from '.../integrations/opentelemetry/span_processor.py'> does not have the attribute 'start_transaction'

To view more test analytics, go to the Test Analytics Dashboard
Got feedback? Let us know on Github

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.

1 participant