
    gU                        d dl mZ d dlmZmZ 	 d dlmZ erd dl	m
Z
 d dlmZ d dlmZmZ dd	d	d
	 	 	 	 	 	 	 	 	 	 	 ddZy	# e$ r	  ed      w xY w)    )annotations)TYPE_CHECKINGAny)OpenTelemetryMiddlewarez`logfire.instrument_wsgi()` requires the `opentelemetry-instrumentation-wsgi` package.
You can install this with:
    pip install 'logfire[wsgi]')WSGIApplication)maybe_capture_server_headers)RequestHookResponseHookFN)capture_headersrequest_hookresponse_hookc               6    t        |       t        | f||d|S )zInstrument `app` so that spans are automatically created for each request.

    See the `Logfire.instrument_wsgi` method for details.
    )r   r   )r   r   )appr   r   r   kwargss        X/var/www/openai/venv/lib/python3.12/site-packages/logfire/_internal/integrations/wsgi.pyinstrument_wsgir      s%     !1"3i\Q^ibhii    )r   r   r   boolr   zRequestHook | Noner   zResponseHook | Noner   r   returnr   )
__future__r   typingr   r   "opentelemetry.instrumentation.wsgir   ImportErrorRuntimeErrorwsgiref.typesr   logfire._internal.utilsr   logfire.integrations.wsgir	   r
   r    r   r   <module>r      s    " %J - @ ? "'+)-j	j j %	j
 'j j j  
	* s   A A