Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: module 'ddtrace.internal.datadog.profiling.ddup' has no attribute 'SampleHandle' #11892

Open
jasha-hrp opened this issue Jan 10, 2025 · 1 comment · May be fixed by #12029
Open

[BUG]: module 'ddtrace.internal.datadog.profiling.ddup' has no attribute 'SampleHandle' #11892

jasha-hrp opened this issue Jan 10, 2025 · 1 comment · May be fixed by #12029
Assignees
Labels
bug Profiling Continous Profling

Comments

@jasha-hrp
Copy link

Tracer Version(s)

ddtrace.version == '2.18.1'

Python Version(s)

Python 3.11.9

Pip Version(s)

pip 24.0

Bug Report

Hi,

I'm seeing AttributeError: module 'ddtrace.internal.datadog.profiling.ddup' has no attribute 'SampleHandle'.

Reproduction Code

Although I don't have a minimal repro for the issue, I can report that I'm doing the following:

  • import ddtrace.auto
  • import ddtrace.profiling.auto
  • set DD_PROFILING_TIMELINE_ENABLED=true
  • Used @ddtrace.tracer.wrap() decorator
  • Used tracer.context_provider.activate(trace_ctx) in a thread
  • Used with tracer.trace(...) context manager
  • tracer.sample(tracer.current_root_span())
  • Get tracer.current_trace_context(), to be passed to another thread

Error Logs

2025-01-10T03:47:47.530239Z [error    ] Billing failed with an unhandled exception (Billing Overall Summary and Billing Summary for Counterparty will not be available): Traceback (most recent call last):
  File "/Users/jasha/digital-pb/backend/code/.venv/lib/python3.11/site-packages/ddtrace/profiling/collector/__init__.py", line 43, in periodic
    for events in self.collect():
                  ^^^^^^^^^^^^^^
  File "/Users/jasha/digital-pb/backend/code/.venv/lib/python3.11/site-packages/ddtrace/profiling/collector/memalloc.py", line 191, in collect
    handle = ddup.SampleHandle()
             ^^^^^^^^^^^^^^^^^
AttributeError: module 'ddtrace.internal.datadog.profiling.ddup' has no attribute 'SampleHandle'
 [billing.v0.logging] dd.service=backend.code.billing.v0 filename=logging.py func_name=_handle_exception lineno=96
Traceback (most recent call last):
  File "/Users/jasha/digital-pb/backend/code/.venv/lib/python3.11/site-packages/ddtrace/profiling/collector/__init__.py", line 43, in periodic
    for events in self.collect():
                  ^^^^^^^^^^^^^^
  File "/Users/jasha/digital-pb/backend/code/.venv/lib/python3.11/site-packages/ddtrace/profiling/collector/memalloc.py", line 191, in collect
    handle = ddup.SampleHandle()
             ^^^^^^^^^^^^^^^^^
AttributeError: module 'ddtrace.internal.datadog.profiling.ddup' has no attribute 'SampleHandle'

Libraries in Use

ddtrace, concurrent.futures.ThreadPoolExecutor

Operating System

macOS 15.2 (24C101) Sequoia, Darwin Kernel Version 24.2.0

@jasha-hrp jasha-hrp added the bug label Jan 10, 2025
@taegyunkim taegyunkim self-assigned this Jan 22, 2025
@taegyunkim taegyunkim added the Profiling Continous Profling label Jan 22, 2025
@taegyunkim
Copy link
Contributor

Hi @jasha-hrp, thank you for reporting this. Will submit a fix soon and report back here.

@taegyunkim taegyunkim linked a pull request Jan 23, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Profiling Continous Profling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants