File: //var/opt/nydus/ops/mysql/opentelemetry/sdk/trace/__pycache__/__init__.cpython-39.pyc
a
�,�h�� �
@ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m
Z
d dlmZ d dl
mZ d dlmZ d dlmZmZ d dlmZmZmZmZmZmZmZmZmZ d dlmZ d d lmZ d d
l m!Z"m#Z$ d dl%m&Z& d dl'm(Z( d d
l)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1 d dl2m3Z3 d dl4m5Z5 d dl6m7Z7m8Z8 d dl9m:Z: d dl;m<Z<m=Z= d dl>m?Z? d dl@mAZAmBZB d dlCmZ e�DeE�ZFdZGdZHdZIdZJdZKdZLdZMG dd� d�ZNG dd� deN�ZOG dd� deN�ZPG dd� de jQ�ZRG d d!� d!eR�ZSd"d#� ZTG d$d%� d%�ZUG d&d'� d'�ZVeVeVjWeVjWeVjWeVjWeVjWeVjWeVjWeVjWd(�ZXeV�Yde.eH�ZZG d)d*� d*e$j[eU�Z[G d+d,� d,e[�Z\G d-d.� d.e$j]�Z]G d/d0� d0e$j^�Z^dS )1� N)�OrderedDict)�contextmanager)�environ)�time_ns)�MappingProxyType�
TracebackType) �Any�Callable�Dict�Iterator�Optional�Sequence�Tuple�Type�Union)�filterwarnings)�
deprecated)�context�trace)�BoundedAttributes)�util)�OTEL_ATTRIBUTE_COUNT_LIMIT�!OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT� OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT�OTEL_LINK_ATTRIBUTE_COUNT_LIMIT�OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT�&OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT�OTEL_SPAN_EVENT_COUNT_LIMIT�OTEL_SPAN_LINK_COUNT_LIMIT)�Resource)�sampling)�IdGenerator�RandomIdGenerator)�BoundedList)�InstrumentationInfo�InstrumentationScope)�SpanContext)�Status�
StatusCode)�types� � c @ sZ e Zd ZdZddeej dd�dd�Zddd�d d
�Zdd�dd
�Z de
ed�dd�ZdS )�
SpanProcessora Interface which allows hooks for SDK's `Span` start and end method
invocations.
Span processors can be registered directly using
:func:`TracerProvider.add_span_processor` and they are invoked
in the same order as they were registered.
N�Span��span�parent_context�returnc C s dS )a� Called when a :class:`mysql.opentelemetry.trace.Span` is started.
This method is called synchronously on the thread that starts the
span, therefore it should not block or throw an exception.
Args:
span: The :class:`mysql.opentelemetry.trace.Span` that just started.
parent_context: The parent context of the span that just started.
N� ��selfr/ r0 r2 r2 �Y/opt/nydus/tmp/pip-target-wkfpz8uv/lib64/python/mysql/opentelemetry/sdk/trace/__init__.py�on_startQ s zSpanProcessor.on_start�ReadableSpan�r/ r1 c C s dS )a2 Called when a :class:`mysql.opentelemetry.trace.Span` is ended.
This method is called synchronously on the thread that ends the
span, therefore it should not block or throw an exception.
Args:
span: The :class:`mysql.opentelemetry.trace.Span` that just ended.
Nr2 �r4 r/ r2 r2 r5 �on_end` s zSpanProcessor.on_end�r1 c C s dS )zPCalled when a :class:`mysql.opentelemetry.sdk.trace.TracerProvider` is shutdown.Nr2 �r4 r2 r2 r5 �shutdownj s zSpanProcessor.shutdown�0u ��timeout_millisr1 c C s dS )a+ Export all ended spans to the configured Exporter that have not yet
been exported.
Args:
timeout_millis: The maximum amount of time to wait for spans to be
exported.
Returns:
False if the timeout is exceeded, True otherwise.
Nr2 �r4 r@ r2 r2 r5 �force_flushm s zSpanProcessor.force_flush)N)r>