o
    3IhR                     @   s8   d dl Z d dlZd dlmZ d dlZdd Zdd ZdS )    N)dedentc                 C      |  d}|td ttj}tjtj	t
|gtjd W d    n1 s*w   Y  |jj}d|v s9J d|v s?J d|v sEJ d|v sKJ d S )Napp.pyz
    from posthog import Posthog
    posthog = Posthog('phc_x', host='https://eu.i.posthog.com', enable_exception_autocapture=True, debug=True, on_error=lambda e, batch: print('error handling batch: ', e, batch))

    # frame_value = "LOL"

    1/0
    stderr   ZeroDivisionError   LOL(   DEBUG:posthog:data uploaded successfully   "$exception_list": [{"mechanism": {"type": "generic", "handled": true}, "module": null, "type": "ZeroDivisionError", "value": "division by zero", "stacktrace": {"frames": [{"platform": "python", "filename": "app.py", "abs_path"joinwriter   pytestraises
subprocessCalledProcessErrorcheck_outputsys
executablestrSTDOUTvalueoutputtmpdirappexcinfor    r   c/home/air/sanwanet/gpt-api/venv/lib/python3.10/site-packages/posthog/test/test_exception_capture.pytest_excepthook       
r   c                 C   r   )Nr   aE  
    from posthog import Posthog, Integrations
    posthog = Posthog('phc_x', host='https://eu.i.posthog.com', enable_exception_autocapture=True, exception_autocapture_integrations=[Integrations.Django], debug=True, on_error=lambda e, batch: print('error handling batch: ', e, batch))

    # frame_value = "LOL"

    1/0
    r   r   r   r	   r
   r   r   r   r   r   %test_trying_to_use_django_integration%   r    r!   )r   r   textwrapr   r   r   r!   r   r   r   r   <module>   s    