mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-19 14:49:40 +00:00
feat: telemetry logging fixes
this does a few things: 1. fixes `on_start` so that all span [START] and [END] is printed. not just [END] 2. change `log.py` to set the default `telemetry` category to WARN not INFO This allows us to keep the metric logging and the verbosity of seeing the span [START] and [END] but by default hides it from normal users. This conforms to our logging system since a user just need to switch the category to INFO to see the logs Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
parent
a6e2c18909
commit
6bcc1ad205
2 changed files with 11 additions and 6 deletions
|
|
@ -21,9 +21,6 @@ class ConsoleSpanProcessor(SpanProcessor):
|
|||
self.print_attributes = print_attributes
|
||||
|
||||
def on_start(self, span: ReadableSpan, parent_context=None) -> None:
|
||||
if span.attributes and span.attributes.get("__autotraced__"):
|
||||
return
|
||||
|
||||
timestamp = datetime.fromtimestamp(span.start_time / 1e9, tz=UTC).strftime("%H:%M:%S.%f")[:-3]
|
||||
logger.info(f"[dim]{timestamp}[/dim] [bold magenta][START][/bold magenta] [dim]{span.name}[/dim]")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue