Skip to content

chore: Remove ai.monitoring.record_token_usage() - #7553

Draft
alexander-alderman-webb wants to merge 5 commits into
major/3.0from
webb/remove-record-token-usage
Draft

alexander-alderman-webb wants to merge 5 commits into
major/3.0from
webb/remove-record-token-usage

Conversation

@alexander-alderman-webb

Copy link
Copy Markdown
Contributor

Description

Issues

Reminders

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

63695 passed | ❌ 117 failed | ⏭️ 2780 skipped | Total: 66592 | Pass Rate: 95.65% | Execution Time: 192m 16s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -68910
Passed Tests 📉 -64659
Failed Tests 📈 +117
Skipped Tests 📉 -4368

➕ New Tests (117)

View new tests
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_with_detailed_fields
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_input_counting
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_streaming
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_manual_output_counting_choices
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_completions_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_from_response
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_no_usage_data
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing
  • test_responses_token_usage_manual_output_counting_response_output
    • File: tests.integrations.openai.test_openai
    • Status: ❌ Failing

❌ Failed Tests

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.10-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
/usr/lib/python3.10/unittest/mock.py:1447: in __enter__
    original, local = self.get_original()
/usr/lib/python3.10/unittest/mock.py:1420: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.11-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1446: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1419: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.11-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1446: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1419: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.11-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1446: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1419: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.11-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1446: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1419: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.11-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1446: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1419: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.11-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1446: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py:1419: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.12-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1467: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.12.14-linux-x86_64-gnu/lib/python3.12/unittest/mock.py:1437: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.13-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1503: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.13.15-linux-x86_64-gnu/lib/python3.13/unittest/mock.py:1473: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.14-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v2.54.0
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.14t-openai-base-v3.16.2
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1510: in __enter__
    original, local = self.get_original()
                      ^^^^^^^^^^^^^^^^^^^
../../_temp/uv-python-dir/cpython-3.14.7+freethreaded-linux-x86_64-gnu/lib/python3.14t/unittest/mock.py:1480: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.0.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3260: in test_completions_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_with_detailed_fields

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3298: in test_completions_token_usage_with_detailed_fields
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_input_counting

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3337: in test_completions_token_usage_manual_input_counting
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_streaming

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3376: in test_completions_token_usage_manual_output_counting_streaming
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_manual_output_counting_choices

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3428: in test_completions_token_usage_manual_output_counting_choices
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_completions_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3460: in test_completions_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_from_response

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3500: in test_responses_token_usage_from_response
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_no_usage_data

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3527: in test_responses_token_usage_no_usage_data
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

test_responses_token_usage_manual_output_counting_response_output

File: tests.integrations.openai.test_openai
Suite: py3.8-openai-base-v1.109.1
Error: AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

Stack Trace
tests/integrations/openai/test_openai.py:3591: in test_responses_token_usage_manual_output_counting_response_output
    with mock.patch(
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1393: in __enter__
    original, local = self.get_original()
../../_temp/uv-python-dir/cpython-3.8-linux-x86_64-gnu/lib/python3.8/unittest/mock.py:1366: in get_original
    raise AttributeError(
E   AttributeError: <module 'sentry_sdk.integrations.openai' from '/home/runner/work/sentry-python/sentry-python/sentry_sdk/integrations/openai.py'> does not have the attribute 'record_token_usage'

✅ Patch coverage is 86.67%. Project has 2096 uncovered lines.
❌ Project coverage is 90.01%. Comparing base (deadc7a) to head (88455f2).

Files with missing lines (4)
File Patch % Lines
sentry_sdk/integrations/openai.py 87.50% ⚠️ 3 Missing and 8 partials
sentry_sdk/integrations/cohere.py 60.00% ⚠️ 6 Missing and 4 partials
sentry_sdk/integrations/litellm.py 90.91% ⚠️ 1 Missing and 4 partials
sentry_sdk/integrations/anthropic.py 100.00% ⚠️ 3 partials
Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
- Coverage    90.20%    90.01%    -0.19%
==========================================
  Files          194       178       -16
  Lines        25888     20986     -4902
  Branches      9584      7580     -2004
==========================================
+ Hits         23352     18890     -4462
- Misses        2536      2096      -440
- Partials      1455      1209      -246

Generated by Codecov Action

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