File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ def observe(
274274
275275 name = func .__qualname__
276276 attributes = {
277- AttributeKeys .SPAN_TYPE : span_type ,
277+ AttributeKeys .JUDGMENT_SPAN_KIND : span_type ,
278278 }
279279
280280 if inspect .iscoroutinefunction (func ):
Original file line number Diff line number Diff line change 88
99
1010class AttributeKeys :
11- SPAN_TYPE = SpanAttributes .TYPE
12-
1311 # General function tracing attributes (custom namespace)
12+ JUDGMENT_SPAN_KIND = "judgment.span_kind"
1413 JUDGMENT_INPUT = "judgment.input"
1514 JUDGMENT_OUTPUT = "judgment.output"
1615
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def wrapped(function):
5353 @functools .wraps (function )
5454 def wrapper (* args , ** kwargs ):
5555 with sync_span_context (
56- tracer , span_name , {AttributeKeys .SPAN_TYPE : "llm" }
56+ tracer , span_name , {AttributeKeys .JUDGMENT_SPAN_KIND : "llm" }
5757 ) as span :
5858 span .set_attribute (AttributeKeys .GEN_AI_PROMPT , safe_serialize (kwargs ))
5959 try :
@@ -87,7 +87,7 @@ def wrapped_async(function):
8787 @functools .wraps (function )
8888 async def wrapper (* args , ** kwargs ):
8989 async with async_span_context (
90- tracer , span_name , {AttributeKeys .SPAN_TYPE : "llm" }
90+ tracer , span_name , {AttributeKeys .JUDGMENT_SPAN_KIND : "llm" }
9191 ) as span :
9292 span .set_attribute (AttributeKeys .GEN_AI_PROMPT , safe_serialize (kwargs ))
9393 try :
You can’t perform that action at this time.
0 commit comments