Rename library

Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
Andras Schmelczer 2022-05-08 22:04:55 +02:00
commit 04404f2fc4

View file

@ -0,0 +1,12 @@
import inspect
from typing import Any
from ..tracing import TracingContext
def log_metric(argument_name: str, value: Any) -> None:
context = TracingContext.get_current_context()
caller = inspect.stack()[1].function
actual_name = f"metric:{caller}:{argument_name}"
if context:
context.log_value(name=actual_name, value=value)