o
    i                     @  st   d dl mZ d dlZd dlmZmZ d dlmZ zd dlm	Z	 W n e
y+   edw edejdZdddZdS )    )annotationsN)AnyTypeVar)TracerProvider)SQLite3Instrumentorz`logfire.instrument_sqlite3()` requires the `opentelemetry-instrumentation-sqlite3` package.
You can install this with:
    pip install 'logfire[sqlite3]'SQLite3Connectionconntracer_providerr   kwargsr   returnc                 K  s.   | durt  j| |dS t  jdd|i|S )zInstrument the `sqlite3` module so that spans are automatically created for each query.

    See the `Logfire.instrument_sqlite3` method for details.
    N)r	   r	    )r   instrument_connection
instrument)r   r	   r
   r   r   l/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/logfire/_internal/integrations/sqlite3.pyinstrument_sqlite3   s   r   )r   r   r	   r   r
   r   r   r   )
__future__r   sqlite3typingr   r   opentelemetry.tracer   %opentelemetry.instrumentation.sqlite3r   ImportErrorRuntimeError
Connectionr   r   r   r   r   r   <module>   s    