Ë
    tPêjÃP  ã                   ó  — U d Z ddlmZmZ ddlmZmZmZmZ ddl	m
Z
mZmZ ddlmZ ddlmZmZ ddlmZ ddlmZmZ dd	lmZ dd
lmZ ddlmZmZmZmZm Z  ddl!mZ" ddl#m$Z$ ddl%m&Z&m'Z'm(Z( ddl)m*Z*m+Z+m,Z,m-Z- ddl.m/Z/ ddl0m1Z1m2Z2m3Z3 ddl4m5Z5 ddl6m7Z8 ddl9m:Z:m;Z; ddl<m=Z= ddl>m?Z? erddlm@Z@ ddlAmBZB e?j†                  e2j†                  e?jˆ                  e2jˆ                  e?jŠ                  e2jŠ                  e?jŒ                  e2jŒ                  e?jŽ                  e2jŽ                  iZHeeIe?e2f      eJd<   de?de2fd„ZKi ZLeeIeMee:ge-f   f      eJd<   deMdee:ge-f   ddfd „ZN G d!„ d"e'«      ZOd#eMdz  deMdz  fd$„ZPd%eMdz  deIeMeMf   fd&„ZQd'ZReeJd(<   d)ZSeeJd*<   d+ZTeeJd,<   deMded-   fd.„ZUd/e:de-fd0„ZVd1e-d2eWdz  de'fd3„ZXd4e;de-fd5„ZYd#eMdz  deMdz  fd6„ZZd4e;dd7fd8„Z[d#eMdz  deMdz  fd9„Z\d4e;defd:„Z]	 dOd4e;d;edz  defd<„Z^	 dOd4e;d=edz  dedz  fd>„Z_dPd?ed@eMdefdA„Z`	 dOd4e;dBdCde"fdD„Za	 dOd4e;dEedz  defdF„ZbdPd?ed@eMddGfdH„Zcd4e;de$fdI„Zd	 	 	 dQd4e;d1e-dz  dJe'dz  dKeWdz  de(f
dL„ZedPd?e(d@eMde3fdM„Zf	 dOd4e;dz  dege(e/f   fdN„Zhy)Rz9Provider / exporter factory + the Baggage span processor.é    )ÚCallableÚIterable)ÚTYPE_CHECKINGÚAnyÚFinalÚLiteral)Ú_logsÚbaggageÚmetrics)ÚEventLogger)ÚLoggerProviderÚNoOpLoggerProvider)ÚContext)ÚMeterProviderÚNoOpMeterProvider)ÚEventLoggerProvider)r   )ÚBatchLogRecordProcessorÚConsoleLogExporterÚInMemoryLogExporterÚLogExporterÚSimpleLogRecordProcessor)r   )ÚResource)ÚReadableSpanÚSpanProcessorÚTracerProvider)ÚBatchSpanProcessorÚConsoleSpanExporterÚSimpleSpanProcessorÚSpanExporter)ÚInMemorySpanExporter)ÚSpanÚSpanKindÚTracer)Úparse_env_headers)Úversion)ÚExporterSpecÚOpenTelemetryV2Config)ÚLiteLLM)ÚLiteLLMSpanKind)ÚMeter)ÚMetricReaderÚ_SPAN_KIND_BY_ROLE_KINDÚkindÚreturnc                 ó   — t         |    S ©N)r,   )r-   s    úq/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/integrations/otel/plumbing/providers.pyÚto_otel_span_kindr2   5   s   € Ü" 4Ñ(Ð(ó    Ú_EXPORTER_FACTORIESÚfactoryNc                 ó2   — |t         | j                  «       <   y)zARegister a custom exporter ``factory`` for the exporter ``kind``.N)r4   Úlower)r-   r5   s     r1   Úregister_exporter_factoryr8   B   s   € à(/Ô˜Ÿ
™
›Ò%r3   c                   ó¤   — e Zd ZdZej
                  ffdee   deedf   ddfd„Z	dede
fd	„Zdd
ededz  ddfd„Zd
eddfd„Zdd„Zddede
fd„Zy)ÚLiteLLMBaggageSpanProcessorzFStamps an allowlisted set of Baggage entries onto every span at start.Úallowed_keysÚallowed_prefixes.r.   Nc                 óD   — t        |«      | _        t        |«      | _        y r0   )Ú	frozensetÚ_allowed_keysÚtupleÚ_allowed_prefixes)Úselfr;   r<   s      r1   Ú__init__z$LiteLLMBaggageSpanProcessor.__init__J   s   € ô
 ' |Ó4ˆÔÜ!&Ð'7Ó!8ˆÕr3   Úkeyc                 ó`   ‡— ‰| j                   v xs t        ˆfd„| j                  D «       «      S )Nc              3   ó@   •K  — | ]  }‰j                  |«      –— Œ y ­wr0   )Ú
startswith)Ú.0ÚprefixrD   s     €r1   ú	<genexpr>z:LiteLLMBaggageSpanProcessor._is_allowed.<locals>.<genexpr>S   s   øè ø€ Ò/lÈ6°·±¸v×0FÑ/lùs   ƒ)r?   ÚanyrA   )rB   rD   s    `r1   Ú_is_allowedz'LiteLLMBaggageSpanProcessor._is_allowedR   s+   ø€ Ø�d×(Ñ(Ð(Òl¬CÓ/lÐUY×UkÑUkÔ/lÓ,lÐlr3   ÚspanÚparent_contextc                 óä   — t        j                  |«      j                  «       D ]J  \  }}| j                  |«      sŒt	        |t
        t        t        t        f«      sŒ9|j                  ||«       ŒL y r0   )
r
   Úget_allÚitemsrL   Ú
isinstanceÚstrÚboolÚintÚfloatÚset_attribute)rB   rM   rN   rD   Úvalues        r1   Úon_startz$LiteLLMBaggageSpanProcessor.on_startU   sW   € Ü!Ÿ/™/¨.Ó9×?Ñ?ÓAò 	/‰JˆC�Ø×Ñ Õ$¬°E¼CÄÄsÌEÐ;RÕ)SØ×"Ñ" 3¨Õ.ñ	/r3   c                  ó   — y r0   © )rB   rM   s     r1   Úon_endz"LiteLLMBaggageSpanProcessor.on_endZ   ó   € Ør3   c                  ó   — y r0   r[   )rB   s    r1   Úshutdownz$LiteLLMBaggageSpanProcessor.shutdown]   r]   r3   Útimeout_millisc                  ó   — y)NTr[   )rB   r`   s     r1   Úforce_flushz'LiteLLMBaggageSpanProcessor.force_flush`   r]   r3   r0   )r.   N)i0u  )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r(   ÚMETADATA_PREFIXr   rS   r@   rC   rT   rL   r!   r   rY   r   r\   r_   rU   rb   r[   r3   r1   r:   r:   G   sŸ   „ ÙPð
 .5×-DÑ-DÐ,Fñ9à˜s‘mð9ð    S ™/ð9ð 
ó	9ðm˜sð m tó mñ/˜Tð /°7¸T±>ð /ÈTó /ð
˜<ð ¨Dó óñ¨#ð ¸$ô r3   r:   Úendpointc                 ó¼   — | s| S | j                  d«      } | j                  d«      sd| v r| S dD ]'  }| j                  |«      sŒ| dt        |«        dz   c S  | dz   S )aÌ  Point an OTLP/HTTP base endpoint at the ``/v1/traces`` signal path.

    ``OTEL_EXPORTER_OTLP_ENDPOINT`` is a base URL (e.g. ``http://host:4318``).
    The OTLP/HTTP exporter only appends the ``/v1/traces`` path when it reads
    that env var itself; when an endpoint is passed explicitly it is used
    verbatim, so a base URL would POST to the root and the collector returns
    404. Append the signal path here (leaving an already-correct path intact).
    ú/ú
/v1/tracesz/v2/trace/otlp)ú/v1/logsú/v1/metricsN©ÚrstripÚendswithÚlen©rh   Úother_signals     r1   Ú_otlp_traces_endpointrt   d   s|   € ñ ØˆØ�‰˜sÓ#€Hà×Ñ˜Ô&Ð*:¸hÑ*FØˆØ3ò AˆØ×Ñ˜\Õ*ØÐ0œs <Ó0Ð0Ð1°LÑ@Ò@ðAð �lÑ"Ð"r3   Úrawc                 ó6   — | si S t        t        | d¬«      «      S )aœ  Parse an OTLP ``"k=v,k=v"`` header string into a dict.

    ``OTEL_EXPORTER_OTLP_HEADERS`` is W3C Baggage encoded per the OTLP spec, so
    values are percent-decoded: a vendor that documents
    ``Authorization=Basic%20<token>`` (Grafana Cloud does, because a bare space
    is not representable there) has to reach the exporter as ``Basic <token>``,
    not with a literal ``%20`` that the backend rejects as malformed. The SDK's
    own parser is used so litellm decodes exactly what the OTLP exporters do
    when they read the env var themselves; ``liberal`` keeps values that are not
    percent-encoded (``Authorization=Bearer <token>``) working unchanged.
    T)Úliberal)Údictr$   )ru   s    r1   Úparse_headersry   y   s   € ñ Øˆ	ÜÔ! #¨tÔ4Ó5Ð5r3   ©Ú	in_memoryÚinmemoryÚmemoryÚ_IN_MEMORY_KINDS©Ú	otlp_httpÚhttpzhttp/protobufz	http/jsonÚ_OTLP_HTTP_KINDS©Ú	otlp_grpcÚgrpcÚ_OTLP_GRPC_KINDS)r�   r…   Ú
headerlessc                 óX   — | j                  «       }|t        v s|t        v ry|t        v ryy)aÖ  How an exporter of this ``kind`` carries credentials, per ``_exporter_from_spec``.

    ``http``/``grpc`` exporters (and any registered factory, which builds an
    OTLP exporter) stamp ``spec.headers``; ``console``, ``in_memory``, and any
    unrecognized kind (which falls back to a header-ignoring console exporter)
    are ``headerless``. Routability decisions must read this rather than a
    denylist, so a typo'd or unavailable kind is not mistaken for OTLP.
    r�   r…   r‡   )r7   r‚   r4   r†   )r-   Úresolveds     r1   Úexporter_transportrŠ   �   s2   € ð —j‘j“l€HØÔ#Ñ# xÔ3FÑ'FØØÔ#Ñ#ØØr3   Úspecc                 óš  — | j                   xs dj                  «       }t        j                  |«      }|� || «      S |t        v r
t        «       S |t        v r6ddlm}  |t        | j                  «      t        | j                  «      ¬«      S |t        v r-ddlm}  || j                  t        | j                  «      ¬«      S t        «       S )NÚconsoler   )ÚOTLPSpanExporter©rh   Úheaders)r-   r7   r4   Úgetr~   r    r‚   Ú5opentelemetry.exporter.otlp.proto.http.trace_exporterrŽ   rt   rh   ry   r�   r†   Ú5opentelemetry.exporter.otlp.proto.grpc.trace_exporterr   )r‹   r-   r5   ÚHTTPExporterÚGRPCExporters        r1   Ú_exporter_from_specr–       sµ   € Ø—9‘9Ò) 	×0Ñ0Ó2€DÜ(×,Ñ,¨TÓ2€GØÐÙ�t‹}ÐØÔÑÜ#Ó%Ð%ØÔÑõ	
ñ Ü*¨4¯=©=Ó9Ü! $§,¡,Ó/ô
ð 	
ð ÔÑõ	
ñ  T§]¡]¼MÈ$Ï,É,Ó<WÔXÐXÜÓ Ð r3   ÚexporterÚ
use_simplec                 ób   — |€t        | t        t        f«      }|rt        | «      S t	        | «      S )a  Pick a Simple or Batch span processor for ``exporter``.

    When ``use_simple`` is unset, default to Simple for console and in-memory
    exporters (spans export synchronously, which tests rely on) and Batch for
    everything else (the right export semantics for production).
    )rR   r   r    r   r   )r—   r˜   s     r1   Ú_processor_forrš   ¹   s6   € ð ÐÜ Ô+>Ô@TÐ*UÓVˆ
Ù,6Ô˜xÓ(ÐXÔ<NÈxÓ<XÐXr3   Úconfigc                 ól   — t        t        | j                  | j                  | j                  ¬«      «      S )a  Build a single exporter from the top-level config fields.

    Convenience for the common single-exporter case (and for tests): reads the
    ``exporter`` / ``endpoint`` / ``headers`` fields. To configure multiple
    exporters, populate ``config.exporters`` directly.
    )r-   rh   r�   )r–   r&   r—   rh   r�   )r›   s    r1   Úbuild_span_exporterr�   Å   s'   € ô œ|°·±È6Ï?É?Ðdj×drÑdrÔsÓtÐtr3   c                 ó´   — | s| S | j                  d«      } | j                  d«      r| S dD ]'  }| j                  |«      sŒ| dt        |«        dz   c S  | dz   S )a‚  Point an OTLP/HTTP base endpoint at the ``/v1/metrics`` signal path.

    The OTLP/HTTP exporter only appends ``/v1/metrics`` when it reads
    ``OTEL_EXPORTER_OTLP_ENDPOINT`` itself; an explicitly passed endpoint is used
    verbatim, so a base URL would POST to the root. Mirror ``_otlp_traces_endpoint``
    for the metrics signal (rewriting a sibling signal path when present).
    rj   rm   )rk   rl   Nrn   rr   s     r1   Ú_otlp_metrics_endpointrŸ   Ï   st   € ñ ØˆØ�‰˜sÓ#€HØ×Ñ˜Ô'ØˆØ2ò BˆØ×Ñ˜\Õ*ØÐ0œs <Ó0Ð0Ð1°MÑAÒAðBð �mÑ#Ð#r3   r+   c                 ó†  — ddl m}m} | j                  xs dj	                  «       }|dv r7ddlm}  |t        | j                  «      t        | j                  «      ¬«      }n:|dv r/	 ddlm}  || j                  t        | j                  «      ¬«      }n |«       } ||d
¬«      S # t        $ r}t        d«      |‚d	}~ww xY w)aµ  Build a metric reader mirroring v1's exporter selection.

    ``console`` (and any unrecognized kind) exports to the console; ``otlp_http``
    and ``otlp_grpc`` export over OTLP with the configured endpoint/headers. The
    reader exports on a 5s period, matching v1.

    Histograms keep the SDK's default cumulative temporality. Prometheus-backed
    OTLP receivers (Grafana Cloud / Mimir, and the Prometheus OTLP endpoint)
    reject delta histograms outright with ``invalid temporality and type
    combination``, which drops the whole metric batch, while backends that
    prefer delta still accept cumulative. The enterprise billing exporter
    already relies on the same default.
    r   )ÚConsoleMetricExporterÚPeriodicExportingMetricReaderr�   r   )ÚOTLPMetricExporterr�   rƒ   z‚OpenTelemetry OTLP gRPC metric exporter is not available. Install `opentelemetry-exporter-otlp` and `grpcio` (or `litellm[grpc]`).Niˆ  )Úexport_interval_millis)Ú opentelemetry.sdk.metrics.exportr¡   r¢   r—   r7   Ú6opentelemetry.exporter.otlp.proto.http.metric_exporterr£   rŸ   rh   ry   r�   Ú6opentelemetry.exporter.otlp.proto.grpc.metric_exporterÚImportError)r›   r¡   r¢   r-   ÚHTTPMetricExporterr—   ÚGRPCMetricExporterÚexcs           r1   Úbuild_metric_readerr¬   â   sÇ   € ÷ð
 —?‘?Ò/ i×6Ñ6Ó8€DØÐBÑBõ	
ñ +Ü+¨F¯O©OÓ<Ü! &§.¡.Ó1ô
‰ð 
Ð&Ñ	&ð	õñ &Ø—_‘_Ü! &§.¡.Ó1ô
‰ñ
 )Ó*ˆá(¨È$ÔOÐOøô ò 	ÜðSóð ðûð	ús   Á'B& Â&	C Â/B;Â;C c                 ó´   — | s| S | j                  d«      } | j                  d«      r| S dD ]'  }| j                  |«      sŒ| dt        |«        dz   c S  | dz   S )ay  Point an OTLP/HTTP base endpoint at the ``/v1/logs`` signal path.

    The OTLP/HTTP exporter only appends ``/v1/logs`` when it reads
    ``OTEL_EXPORTER_OTLP_ENDPOINT`` itself; an explicitly passed endpoint is used
    verbatim, so a base URL would POST to the root. Mirror ``_otlp_traces_endpoint``
    for the logs signal (rewriting a sibling signal path when present).
    rj   rl   )rk   rm   Nrn   rr   s     r1   Ú_otlp_logs_endpointr®     sr   € ñ ØˆØ�‰˜sÓ#€HØ×Ñ˜Ô$ØˆØ5ò ?ˆØ×Ñ˜\Õ*ØÐ0œs <Ó0Ð0Ð1°JÑ>Ò>ð?ð �jÑ Ð r3   c                 ó€  — | j                   xs dj                  «       }|dv r
t        «       S |dv r6ddlm}  |t        | j                  «      t        | j                  «      ¬«      S |dv r.	 ddl	m}  || j                  t        | j                  «      ¬«      S t        «       S # t        $ r}t        d«      |‚d	}~ww xY w)
a�  Build a log exporter mirroring the exporter selection of the other signals.

    ``console`` (and any unrecognized kind) exports to the console; ``otlp_http``
    and ``otlp_grpc`` export over OTLP with the configured endpoint/headers;
    ``in_memory`` buffers for tests. Like GenAI metrics, events ride the
    single-destination shorthand fields, not the multi-exporter ``exporters`` list.
    r�   rz   r   r   )ÚOTLPLogExporterr�   rƒ   zOpenTelemetry OTLP gRPC log exporter is not available. Install `opentelemetry-exporter-otlp` and `grpcio` (or `litellm[grpc]`).N)r—   r7   r   Ú4opentelemetry.exporter.otlp.proto.http._log_exporterr°   r®   rh   ry   r�   Ú4opentelemetry.exporter.otlp.proto.grpc._log_exporterr¨   r   )r›   r-   ÚHTTPLogExporterÚGRPCLogExporterr«   s        r1   Úbuild_log_exporterrµ   '  sÆ   € ð —?‘?Ò/ i×6Ñ6Ó8€DØÐ2Ñ2Ü"Ó$Ð$ØÐBÑBõ	
ñ Ü(¨¯©Ó9Ü! &§.¡.Ó1ô
ð 	
ð Ð$Ñ$ð	õñ ¨¯©ÄÈvÏ~É~ÓA^Ô_Ð_ÜÓÐøô ò 	ÜðSóð ðûð	ús   Á,B# Â#	B=Â,B8Â8B=Úlog_exporterc                 óÔ   — |�|n
t        | «      }t        t        | «      ¬«      }t        |t        t
        f«      }|j                  |rt        |«      «       |S t        |«      «       |S )uº  Build the :class:`LoggerProvider` GenAI events export through.

    ``log_exporter`` is an explicit override (tests inject an
    ``InMemoryLogExporter``); otherwise the exporter is selected from the config's
    exporter kind via :func:`build_log_exporter`. Console and in-memory exporters
    get a Simple processor (synchronous export, which tests rely on), everything
    else a Batch processor â€” the same split as span processing.
    ©Úresource)	rµ   ÚSDKLoggerProviderÚbuild_resourcerR   r   r   Úadd_log_record_processorr   r   )r›   r¶   r—   Úproviderr˜   s        r1   Úbuild_logger_providerr¾   J  sq   € ð '3Ð&>‘lÔDVÐW]ÓD^€HÜ'´ÀÓ1GÔH€HÜ" 8Ô.@ÔBUÐ-VÓW€JØ×%Ñ%Ù.8Ô  Ó*ôð €Oô ?VÐV^Ó>_ôð €Or3   Úlogger_providerc                 ó¼   — |�|S t        j                  «       }t        |t        «      r|S t        |t        «      ryt        | «      }t        j                  |«       |S )a  Resolve the :class:`LoggerProvider` GenAI events record through, or ``None``
    when the operator has opted out of the logs signal.

    Same resolution order as :func:`resolve_meter_provider`: an injected provider
    wins (DI/tests); an operator-configured SDK global is reused so events ride
    their pipeline; an explicit ``NoOpLoggerProvider`` global is an opt-out and
    yields ``None``, so no event is ever built. Only the default placeholder
    global makes V2 build a provider from the config and publish it as the global.
    N)r	   Úget_logger_providerrR   rº   r   r¾   Úset_logger_provider)r›   r¿   Úexistingr½   s       r1   Úresolve_logger_providerrÄ   _  sY   € ð Ð"ØÐä&+×&?Ñ&?Ó&A€HÜ�(Ô-Ô.ØˆÜ�(Ô.Ô/Øä+¨FÓ3€HÜ	×Ñ˜hÔ'Ø€Or3   r½   Únamec                 óB   — t        | ¬«      j                  |t        «      S )N)r¿   )r   Úget_event_loggerÚlitellm_version©r½   rÅ   s     r1   rÇ   rÇ   z  s   € Ü¨xÔ8×IÑIÈ$ÔP_Ó`Ð`r3   Úmetric_readerzMetricReader | Nonec                 óN   — |�|n
t        | «      }t        |gt        | «      ¬«      S )zýBuild the :class:`MeterProvider` for GenAI metrics.

    ``metric_reader`` is an explicit override (tests inject an
    ``InMemoryMetricReader``); otherwise the reader is selected from the config's
    exporter kind via :func:`build_metric_reader`.
    )Úmetric_readersr¹   )r¬   ÚSDKMeterProviderr»   )r›   rÊ   Úreaders      r1   Úbuild_meter_providerrÏ   ~  s+   € ð &3Ð%>‘MÔDWÐX^ÓD_€FÜ¨F¨8¼nÈVÓ>TÔUÐUr3   Úmeter_providerc                 ó¦   — |�|S t        j                  «       }t        |t        t        f«      r|S t        | «      }t        j                  |«       |S )aq  Resolve the :class:`MeterProvider` GenAI metrics record through.

    An injected provider wins (DI/tests). Otherwise reuse whatever the operator has
    configured as the global, whether a real SDK provider or an explicit
    ``NoOpMeterProvider``, so the GenAI histograms ride the operator's
    readers/exporters and an explicit opt-out is honored. Only when the global is
    still the default proxy placeholder does V2 build one from the config and
    publish it as the global, mirroring how V2 owns trace export. The built
    provider is the one returned, so its reader thread is always live, never
    orphaned.
    )r   Úget_meter_providerrR   rÍ   r   rÏ   Úset_meter_provider)r›   rÐ   rÃ   r½   s       r1   Úresolve_meter_providerrÔ   Œ  sQ   € ð Ð!ØÐä×0Ñ0Ó2€HÜ�(Ô-Ô/@ÐAÔBØˆä*¨6Ó2€HÜ×Ñ˜xÔ(Ø€Or3   r*   c                 ó.   — | j                  |t        «      S r0   )Ú	get_meterrÈ   rÉ   s     r1   rÖ   rÖ   §  s   € Ø×Ñ˜d¤OÓ4Ð4r3   c                 ó´   — d| j                   i}| j                  r| j                  |d<   |j                  | j                  «       t	        j
                  |«      S )Nzservice.namezdeployment.environment)Úservice_nameÚdeployment_environmentÚupdateÚresource_attributesr   Úcreate)r›   Ú
attributess     r1   r»   r»   «  sO   € Ø)7¸×9LÑ9LÐ(M€JØ×$Ò$Ø/5×/LÑ/Lˆ
Ð+Ñ,Ø×Ñ�f×0Ñ0Ô1Ü�?‰?˜:Ó&Ð&r3   Úbaggage_processorÚuse_simple_processorc                 ó�  — t        t        | «      ¬«      }|€t        | j                  ¬«      }|j	                  |«       |�|j	                  t        ||«      «       |S | j                  D ]Y  }|j                  r|j                  sŒt        |«      }|j	                  t        ||j                  �|j                  n|«      «       Œ[ |S )u¦  Build the shared :class:`TracerProvider`.

    Attach the Baggage processor first (so identity attributes land on each
    span before any export decision), then add one ``SpanProcessor`` per
    ``config.exporters`` entry â€” this is what fans spans out to multiple
    backends. ``exporter`` and ``use_simple_processor`` are explicit overrides:
    pass a single exporter to attach exactly that one (used by tests).
    r¸   )r;   )r   r»   r:   Úbaggage_promoted_keysÚadd_span_processorrš   Ú	exportersÚrequires_headersr�   r–   rß   )r›   r—   rÞ   rß   r½   r‹   Úexps          r1   Úbuild_tracer_providerræ   ³  sÄ   € ô %¬n¸VÓ.DÔE€HØÐ Ü7ÀV×EaÑEaÔbÐØ×ÑÐ 1Ô2àÐØ×#Ñ#¤N°8Ð=QÓ$RÔSØˆð × Ñ ò 	
ˆØ× Ò ¨¯ªØÜ! $Ó'ˆØ×#Ñ#ÜØØ.2×.GÑ.GÐ.S�×*Ò*ÐYmóõ	
ð		
ð €Or3   c                 ó.   — | j                  |t        «      S r0   )Ú
get_tracerrÈ   rÉ   s     r1   rè   rè   Ù  s   € ð ×Ñ˜t¤_Ó5Ð5r3   c                 óX   — | xs t        d¬«      }t        «       }t        ||¬«      }||fS )zCConvenience for tests: a provider exporting to an in-memory buffer.r{   )r—   )r'   r    ræ   )r›   Úcfgr—   r½   s       r1   Úin_memory_providerrë   à  s3   € ð ÒFÔ0¸+ÔF€CÜ*Ó,€HÜ+¨C¸(ÔC€HØ�XÐÐr3   r0   )Úlitellm)NNN)irf   Úcollections.abcr   r   Útypingr   r   r   r   Úopentelemetryr	   r
   r   Úopentelemetry._eventsr   Úopentelemetry._logsr   r   Úopentelemetry.contextr   Úopentelemetry.metricsr   r   Úopentelemetry.sdk._eventsr   Úopentelemetry.sdk._logsrº   Úopentelemetry.sdk._logs.exportr   r   r   r   r   Úopentelemetry.sdk.metricsrÍ   Úopentelemetry.sdk.resourcesr   Úopentelemetry.sdk.tracer   r   r   Úopentelemetry.sdk.trace.exportr   r   r   r   Ú6opentelemetry.sdk.trace.export.in_memory_span_exporterr    Úopentelemetry.tracer!   r"   r#   Úopentelemetry.util.rer$   Úlitellm._versionr%   rÈ   Ú&litellm.integrations.otel.model.configr&   r'   Ú'litellm.integrations.otel.model.semconvr(   Ú%litellm.integrations.otel.model.spansr)   r*   r¥   r+   ÚSERVERÚCLIENTÚINTERNALÚPRODUCERÚCONSUMERr,   rx   Ú__annotations__r2   r4   rS   r8   r:   rt   ry   r~   r‚   r†   rŠ   r–   rT   rš   r�   rŸ   r¬   r®   rµ   r¾   rÄ   rÇ   rÏ   rÔ   rÖ   r»   ræ   rè   r@   rë   r[   r3   r1   ú<module>r     sþ  ðÚ ?ç .ß 5Ó 5ç 1Ñ 1Ý -ß BÝ )ß BÝ 9Ý G÷õ õ HÝ 0ß OÑ O÷ó õ÷ 7Ñ 6Ý 3å 7ß VÝ ;Ý AáÝ+Ý=ð ×Ñ˜HŸO™OØ×Ñ˜HŸO™OØ×Ñ˜h×/Ñ/Ø×Ñ˜h×/Ñ/Ø×Ñ˜h×/Ñ/ðCÐ ˜˜t O°XÐ$=Ñ>Ñ?ó ð)˜Oð )°ó )ð QSÐ �U˜4  X¨|¨n¸lÐ.JÑ%KÐ KÑLÑMÓ Rð0 Cð 0°(¸L¸>È<Ð;WÑ2Xð 0Ð]aó 0ô
 -ô ð:# C¨$¡Jð #°3¸±:ó #ð*6�s˜T‘zð 6 d¨3°¨8¡nó 6ð" >Ð �%Ó =ØMÐ �%Ó MØ/Ð �%Ó /ð˜Sð  WÐ-IÑ%Jó ð"!˜lð !¨|ó !ð2	Y˜\ð 	Y°t¸d±{ð 	YÀ}ó 	YðuÐ 5ð u¸,ó uð$ S¨4¡Zð $°C¸$±Jó $ð&/PÐ 5ð /P¸.ó /Pðd! #¨¡*ð !°°t±ó !ð&  Ð4ð   ¸ó   ðJ (,ñØ!ðà Ñ$ðð óð. 15ñØ!ðà&¨Ñ-ðð ˜Ñóñ6aÐ0ð a¸ð aÈKó að ,0ñVØ!ðVà(ðVð óVð  ,0ñØ!ðà! DÑ(ðð óñ65˜ð 5¨Sð 5Àó 5ð'Ð0ð '°Xó 'ð %)Ø.2Ø(,ñ	#Ø!ð#à˜TÑ!ð#ð % tÑ+ð#ð  ™+ð	#ð
 ó#ñL6˜ð 6¨sð 6À6ó 6ð ,0ñØ! DÑ(ðà
ˆ>Ð/Ð/Ñ0ôr3   