
    g                     X    d dl mZmZ d dlmZ d dlmZ  G d de      Z G d de      Zy)	    )AnyProtocol)Span)
Connectionc            
       ,    e Zd ZdZdededededdf
dZy)	RequestHookz1A hook that is called before the request is sent.spaninstanceargskwargsreturnNc                      y)a  Call the hook.

        Args:
            span: The span that is being created.
            instance: The connection instance.
            *args: The arguments that are passed to the command.
            **kwargs: The keyword arguments that are passed to the command.
        N )selfr	   r
   r   r   s        O/var/www/openai/venv/lib/python3.12/site-packages/logfire/integrations/redis.py__call__zRequestHook.__call__
           __name__
__module____qualname____doc__r   r   r   r   r   r   r   r   r      s.    ;T Z  s W[ r   r   c                   (    e Zd ZdZdedededdfdZy)ResponseHookz5A hook that is called after the response is received.r	   r
   responser   Nc                      y)zCall the hook.

        Args:
            span: The span that is being created.
            instance: The connection instance.
            response: The response that is received.
        Nr   )r   r	   r
   r   s       r   r   zResponseHook.__call__   r   r   r   r   r   r   r   r      s&    ?T Z 3 4 r   r   N)	typingr   r   opentelemetry.tracer   redisr   r   r   r   r   r   <module>r!      s&      $ ( 
8 
r   