mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 21:59:49 +00:00
store attributes values in builtin types to avoid otel warnings
This commit is contained in:
parent
b7a7caa9a8
commit
b0bfa845a9
2 changed files with 6 additions and 7 deletions
|
|
@ -16,6 +16,7 @@ from typing import Any, Callable, Dict, List
|
|||
|
||||
|
||||
from llama_stack.apis.telemetry import * # noqa: F403
|
||||
from llama_stack.providers.utils.telemetry.trace_protocol import serialize_value
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -223,7 +224,7 @@ class SpanContextManager:
|
|||
if self.span:
|
||||
if self.span.attributes is None:
|
||||
self.span.attributes = {}
|
||||
self.span.attributes[key] = value
|
||||
self.span.attributes[key] = serialize_value(value)
|
||||
|
||||
async def __aenter__(self):
|
||||
global CURRENT_TRACE_CONTEXT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue