|
1 | 1 | # -*- coding: utf-8 -*-
|
2 |
| -import ydb |
3 |
| - |
4 | 2 | from . import credentials as credentials_impl, table, scheme, pool
|
| 3 | +from . import tracing |
5 | 4 | import six
|
6 | 5 | import os
|
7 | 6 |
|
@@ -41,7 +40,7 @@ def parse_connection_string(connection_string):
|
41 | 40 |
|
42 | 41 |
|
43 | 42 | def default_credentials(credentials=None, tracer=None):
|
44 |
| - tracer = tracer if tracer is not None else ydb.Tracer(None) |
| 43 | + tracer = tracer if tracer is not None else tracing.Tracer(None) |
45 | 44 | with tracer.trace("Driver.default_credentials") as ctx:
|
46 | 45 | if credentials is not None:
|
47 | 46 | ctx.trace({"credentials.prepared": True})
|
@@ -117,7 +116,6 @@ def __init__(
|
117 | 116 | grpc_lb_policy_name="round_robin",
|
118 | 117 | discovery_request_timeout=10,
|
119 | 118 | ):
|
120 |
| - # type:(str, str, str, str, Any, ydb.Credentials, bool, bytes, bytes, bytes, float, ydb.TableClientSettings, list, str, ydb.Tracer) -> None |
121 | 119 | """
|
122 | 120 | A driver config to initialize a driver instance
|
123 | 121 |
|
@@ -158,7 +156,7 @@ def __init__(
|
158 | 156 | self.grpc_keep_alive_timeout = grpc_keep_alive_timeout
|
159 | 157 | self.table_client_settings = table_client_settings
|
160 | 158 | self.primary_user_agent = primary_user_agent
|
161 |
| - self.tracer = tracer if tracer is not None else ydb.Tracer(None) |
| 159 | + self.tracer = tracer if tracer is not None else tracing.Tracer(None) |
162 | 160 | self.grpc_lb_policy_name = grpc_lb_policy_name
|
163 | 161 | self.discovery_request_timeout = discovery_request_timeout
|
164 | 162 |
|
@@ -235,8 +233,6 @@ def __init__(
|
235 | 233 | credentials=None,
|
236 | 234 | **kwargs
|
237 | 235 | ):
|
238 |
| - # type:(DriverConfig, str, str, str, bytes, ydb.AbstractCredentials, **Any) -> None |
239 |
| - |
240 | 236 | """
|
241 | 237 | Constructs a driver instance to be used in table and scheme clients.
|
242 | 238 | It encapsulates endpoints discovery mechanism and provides ability to execute RPCs
|
|
0 commit comments