o
    i                     @  s   d dl mZ zd dlmZ d dlmZ d dlmZ d dlm	Z	 W n e
y+   edw d dlmZmZ eZeeegef Zdd	dddZdS )    )annotations)Context)AwsLambdaInstrumentor)MeterProvider)TracerProviderz`logfire.instrument_aws_lambda()` requires the `opentelemetry-instrumentation-aws-lambda` package.
You can install this with:
    pip install 'logfire[aws-lambda]')AnyCallableN)event_context_extractorlambda_handlerLambdaHandlertracer_providerr   meter_providerr   r	   'Callable[[LambdaEvent], Context] | Nonekwargsr   returnNonec                K  s(   |dur||d< t  jd||d|S )zInstrument the AWS Lambda runtime so that spans are automatically created for each invocation.

    See the `Logfire.instrument_aws_lambda` method for details.
    Nr	   )r   r    )r   
instrument)r
   r   r   r	   r   r   r   o/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/logfire/_internal/integrations/aws_lambda.pyinstrument_aws_lambda   s   r   )r
   r   r   r   r   r   r	   r   r   r   r   r   )
__future__r   opentelemetry.contextr   (opentelemetry.instrumentation.aws_lambdar   opentelemetry.metricsr   opentelemetry.tracer   ImportErrorRuntimeErrortypingr   r   LambdaEventr   r   r   r   r   r   <module>   s     