MCPcopy
hub / github.com/traceloop/openllmetry / get

Method get

packages/traceloop-sdk/traceloop/sdk/__init__.py:300–316  ·  view source on GitHub ↗

Returns the shared SDK client instance, using the current global configuration. To use the SDK as a singleton, first make sure you have called :func:`Traceloop.init()` at startup time. Then ``get()`` will return the same shared :class:`Traceloop.client.Client` insta

()

Source from the content-addressed store, hash-verified

298
299 @staticmethod
300 def get():
301 """
302 Returns the shared SDK client instance, using the current global configuration.
303
304 To use the SDK as a singleton, first make sure you have called :func:`Traceloop.init()`
305 at startup time. Then ``get()`` will return the same shared :class:`Traceloop.client.Client`
306 instance each time. The client will be initialized if it has not been already.
307
308 If you need to create multiple client instances with different configurations, instead of this
309 singleton approach you can call the :class:`Traceloop.client.Client` constructor directly instead.
310 """
311 if not Traceloop.__client:
312 raise Exception(
313 "Client not initialized, you should call Traceloop.init() first. "
314 "If you are still getting this error - you are missing the api key"
315 )
316 return Traceloop.__client

Callers 15

test_milvus_insertFunction · 0.45
test_milvus_upsertFunction · 0.45
test_milvus_query_equalFunction · 0.45
test_milvus_query_likeFunction · 0.45
test_milvus_query_orFunction · 0.45
test_milvus_query_andFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_milvus_insertFunction · 0.36
test_milvus_upsertFunction · 0.36
test_milvus_query_equalFunction · 0.36
test_milvus_query_likeFunction · 0.36
test_milvus_query_orFunction · 0.36
test_milvus_query_andFunction · 0.36