hyb
2026-01-30 15bc7727b58bf9ca0c8f21702fa893daac232b8d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Ë
Wñúháãó|—dZddlmZmZmZddlmZmZerddlm    Z    ddl
m Z m Z erddl mZd    ed
efd „Zd ed
efd „Zy)z$Trace context propagation utilities.é)Ú TYPE_CHECKINGÚAnyÚCallableé)Ú OTEL_ENABLEDÚTRACEPARENT_HEADER_NAME)Útrace)Úformat_span_idÚformat_trace_idé)ÚMySQLConnectionAbstractÚspanÚreturncó¨—|j«}d}t|j«}t|j«}d}dj ||||g«S)ahBuild a traceparent header according to the provided span.
 
    The context information from the provided span is used to build the traceparent
    header that will be propagated to the MySQL server. For particulars regarding
    the header creation, refer to [1].
 
    This method assumes version 0 of the W3C specification.
 
    Args:
        span (opentelemetry.trace.span.Span): current span in trace.
 
    Returns:
        traceparent_header (str): HTTP header field that identifies requests in a
        tracing system.
 
    References:
        [1]: https://www.w3.org/TR/trace-context/#traceparent-header
    Ú00ú-)Úget_span_contextr Útrace_idr
Úspan_idÚjoin)rÚctxÚversionrrÚ trace_flagss      údH:\Change_password\venv_build\Lib\site-packages\mysql/connector/opentelemetry/context_propagation.pyÚbuild_traceparent_headerr0sP€ð( ×
!€Cà€GܘsŸ|™|Ó,€HܘSŸ[™[Ó)€GØ€Kà 8‰8W˜h¨°Ð=Ó >Ð>óÚmethodcó<‡—dddtdtdtfˆfd„ }|S)aúPerform trace context propagation.
 
    The trace context is propagated via query attributes. The `traceparent` header
    from W3C specification [1] is used, in this sense, the attribute name is
    `traceparent` (is RESERVED, avoid using it), and its value is built as per
    instructed in [1].
 
    If opentelemetry API/SDK is unavailable or there is no recording span,
    trace context propagation is skipped.
 
    References:
        [1]: https://www.w3.org/TR/trace-context/#traceparent-header
    Úcnxr ÚargsÚkwargsrcó\•—tr |js ‰|g|¢­i|¤ŽStj«}d}|j    «r#t |«}|j t|f¬«    ‰|g|¢­i|¤Ž}||jt¬«|S#||jt¬«wwxYw)zContext propagation decorator.N)Úvalue)Úname)    rÚotel_context_propagationr    Úget_current_spanÚ is_recordingrÚquery_attrs_appendrÚquery_attrs_remove)rr r!Ú current_spanÚ    tp_headerÚresultrs      €rÚwrapperz)with_context_propagation.<locals>.wrapper]s½ø€õ 3×#?Ò#?Ù˜#Ð/ Ò/¨Ñ/Ð /ä×-Ñ-Ó/ˆ ؈    Ø × $Ñ $Ô &Ü0°Ó>ˆIØ × "Ñ "Ô*AÀ9Ð)MÐ "Ô Nð    EÙ˜CÐ1 $Ò1¨&Ñ1ˆFàÐ$Ø×&Ñ&Ô,CÐ&ÔD؈ øðÐ$Ø×&Ñ&Ô,CÐ&ÕDð%ús Á* BÂB+)r)rr-s` rÚwith_context_propagationr.Ns,ø€ðÐ.ð´sðÄcðÌcõð& €NrN)Ú__doc__ÚtypingrrrÚ    constantsrrÚ opentelemetryr    Úopentelemetry.trace.spanr
r Ú    abstractsr Ústrrr.©rrú<module>r7sNðñ:+÷0Ñ/ç<áõ$ßHñÝ3ð? 3ð?¨3ó?ð<" Xð"°(ô"r