mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
# What does this PR do? When you re-initialize the library client in a notebook, we were seeing this error: ``` Getting traces for session_id=5c8d1969-0957-49d2-b852-32cbb8ef8caf --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) [<ipython-input-11-d74bb6cdd3ab>](https://localhost:8080/#) in <cell line: 0>() 7 agent_logs = [] 8 ----> 9 for span in client.telemetry.query_spans( 10 attribute_filters=[ 11 {"key": "session_id", "op": "eq", "value": session_id}, 10 frames [/usr/local/lib/python3.11/dist-packages/llama_stack/providers/inline/telemetry/meta_reference/telemetry.py](https://localhost:8080/#) in query_traces(self, attribute_filters, limit, offset, order_by) 246 ) -> QueryTracesResponse: 247 return QueryTracesResponse( --> 248 data=await self.trace_store.query_traces( 249 attribute_filters=attribute_filters, 250 limit=limit, AttributeError: 'TelemetryAdapter' object has no attribute 'trace_store' ``` This is happening because the we were skipping some required steps for the object state as part of the global _TRACE_PROVIDER check. This PR moves the initialization of the object state out of the TRACE_PROVIDER init. |
||
---|---|---|
.. | ||
apis | ||
cli | ||
distribution | ||
providers | ||
scripts | ||
templates | ||
__init__.py |