dd-trace-py icon indicating copy to clipboard operation
dd-trace-py copied to clipboard

feat(tracing): shutdown tracer on app crashes

Open mabdinur opened this issue 1 year ago • 1 comments

Attempts to resolve: https://github.com/DataDog/dd-trace-py/issues/8252

Checklist

  • [ ] Change(s) are motivated and described in the PR description
  • [ ] Testing strategy is described if automated tests are not included in the PR
  • [ ] Risks are described (performance impact, potential for breakage, maintainability)
  • [ ] Change is maintainable (easy to change, telemetry, documentation)
  • [ ] Library release note guidelines are followed or label changelog/no-changelog is set
  • [ ] Documentation is included (in-code, generated user docs, public corp docs)
  • [ ] Backport labels are set (if applicable)
  • [ ] If this PR changes the public interface, I've notified @DataDog/apm-tees.
  • [ ] If change touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.

Reviewer Checklist

  • [ ] Title is accurate
  • [ ] All changes are related to the pull request's stated goal
  • [ ] Description motivates each change
  • [ ] Avoids breaking API changes
  • [ ] Testing strategy adequately addresses listed risks
  • [ ] Change is maintainable (easy to change, telemetry, documentation)
  • [ ] Release note makes sense to a user of the library
  • [ ] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • [ ] Backport labels are set in a manner that is consistent with the release branch maintenance policy

mabdinur avatar Feb 15 '24 23:02 mabdinur

Datadog Report

Branch report: munir/register-tracer-atexit-signal Commit report: 16513f6 Test service: dd-trace-py

:x: 73 Failed (0 Known Flaky), 170900 Passed, 1045 Skipped, 10h 34m 3.83s Total duration (8m 7.29s time saved) :snowflake: 1 New Flaky

:x: Failed Tests (73)

This report shows up to 5 failed tests.

  • test_prog_register - test_atexit.py - Details

    Expand for error
    TDOUT: Expected [hello
    orld
     got [b'']
    
  • test_prog_register - test_atexit.py - Details

    Expand for error
    TDOUT: Expected [hello
    orld
     got [b'']
    
  • test_prog_register - test_atexit.py - Details

    Expand for error
    TDOUT: Expected [hello
    orld
     got [b'']
    
  • test_prog_register - test_atexit.py - Details

    Expand for error
    TDOUT: Expected [hello
    orld
     got [b'']
    
  • test_prog_register - test_atexit.py

New Flaky Tests (1)

  • test_asyncio - test_stack_asyncio.py - Last Failure

    Expand for error
    ssert 42 == 1
    +  where 42 = len([DDFrame(file_name='/root/project/tests/profiling/collector/test_stack_asyncio.py', lineno=42, function_name='hello', ...project/tests/profiling/collector/test_stack_asyncio.py', lineno=67, function_name='test_asyncio', class_name=''), ...])
    +    where [DDFrame(file_name='/root/project/tests/profiling/collector/test_stack_asyncio.py', lineno=42, function_name='hello', ...project/tests/profiling/collector/test_stack_asyncio.py', lineno=67, function_name='test_asyncio', class_name=''), ...] = StackSampleEvent(timestamp=1708040743430643592, sampling_period=58347333, thread_id=140612423460672, thread_name='Main..._root_span_id=None, span_id=None, trace_type=None, trace_resource_container=None, wall_time_ns=95947051, cpu_time_ns=0).frames
    

Unplanned Work. Feel free to reopen if you have capacity.

mabdinur avatar Apr 19 '24 16:04 mabdinur